SlideShare a Scribd company logo
1 of 6
Download to read offline
Lab Report # 02
EE-112L - Programming Fundamentals Lab
by
Ausaf Ahmad
Section: A
Reg. # 20MDELE136
Class No.: 18
Instructor
Engr. Jawad Ali
Lecturer
Department of Electrical Engineering,
University of Engineering and Technology
Mardan
DATED: 04/04/2021
Task: Taking Input at Run Time.
Below is the code for converting the given temperature from
Fahrenheit to Celsius.
This code is taking input from user at run time.
CODE:
// Fahrenheit to Celsius in C
// ----Lab Report # 02-----
// ----20MDELE136-----
// ----AUSAF AHMAD-----
#include<stdio.h>
int main()
{
printf("This program is taking input from user at
run time as the user is required to given the temperature
at run timen");
printf("n");
float fahrenheit, celsius;
printf("Enter Temperature Value (in Fahrenheit): ");
scanf("%f", &fahrenheit);
celsius = (fahrenheit-32)/1.8; //formula for celsius to
fahrenheit is: celsius = (fahrenheit-32)/(180/100) As
180/100=1.8
printf("nEquivalent Temperature (in Celsius) =
%0.2f", celsius);
return 0;
}
Snap-A (i.e. CODE)
Result:
Snap-B (Result)
The End

More Related Content

Similar to Lab2 (pfl) 20_mdele136(ausaf)

Lab5 (pfl) 20_mdele136(ausaf)
Lab5 (pfl) 20_mdele136(ausaf)Lab5 (pfl) 20_mdele136(ausaf)
Lab5 (pfl) 20_mdele136(ausaf)Ausaf Ahmad
 
Embedded System Practical manual (1)
Embedded System Practical manual (1)Embedded System Practical manual (1)
Embedded System Practical manual (1)Niraj Bharambe
 
Yazan Al-Najjar MAJOR PROJECTS
Yazan Al-Najjar MAJOR PROJECTSYazan Al-Najjar MAJOR PROJECTS
Yazan Al-Najjar MAJOR PROJECTSYazan Al-Najjar
 
Report for weather pi
Report for weather piReport for weather pi
Report for weather piAsutosh Hota
 
IRJET- Development of Generalize Software to Estimate Cooling Load for Air Co...
IRJET- Development of Generalize Software to Estimate Cooling Load for Air Co...IRJET- Development of Generalize Software to Estimate Cooling Load for Air Co...
IRJET- Development of Generalize Software to Estimate Cooling Load for Air Co...IRJET Journal
 
Programming with c language practical manual
Programming with c language practical manualProgramming with c language practical manual
Programming with c language practical manualAnil Bishnoi
 
15LLP108_Demo4_LedBlinking.pdf1. Introduction In D.docx
15LLP108_Demo4_LedBlinking.pdf1. Introduction In D.docx15LLP108_Demo4_LedBlinking.pdf1. Introduction In D.docx
15LLP108_Demo4_LedBlinking.pdf1. Introduction In D.docxfelicidaddinwoodie
 
Real-Time Monitoring of Industrial Environmental Temperature using LabVIEW
Real-Time Monitoring of Industrial Environmental Temperature using LabVIEWReal-Time Monitoring of Industrial Environmental Temperature using LabVIEW
Real-Time Monitoring of Industrial Environmental Temperature using LabVIEWIJERA Editor
 
Udayan_219209024_DA1001_FTP.pptx
Udayan_219209024_DA1001_FTP.pptxUdayan_219209024_DA1001_FTP.pptx
Udayan_219209024_DA1001_FTP.pptxSyncrotrone
 
Data Acquisition
Data AcquisitionData Acquisition
Data Acquisitionazhar557
 
Shah2019 chapter an_arduinomicro-controlleropera
Shah2019 chapter an_arduinomicro-controlleroperaShah2019 chapter an_arduinomicro-controlleropera
Shah2019 chapter an_arduinomicro-controlleroperaGodwinraj D
 
TEMPERATURE CONTROL AND DATA ACQUISITION METHOD FOR FACTORY USING LABVIEW
TEMPERATURE CONTROL AND DATA ACQUISITION METHOD FOR FACTORY USING LABVIEWTEMPERATURE CONTROL AND DATA ACQUISITION METHOD FOR FACTORY USING LABVIEW
TEMPERATURE CONTROL AND DATA ACQUISITION METHOD FOR FACTORY USING LABVIEWIAEME Publication
 
SimScale to IES for Building Simulation
SimScale to IES for Building SimulationSimScale to IES for Building Simulation
SimScale to IES for Building SimulationSimScale
 

Similar to Lab2 (pfl) 20_mdele136(ausaf) (20)

Lab5 (pfl) 20_mdele136(ausaf)
Lab5 (pfl) 20_mdele136(ausaf)Lab5 (pfl) 20_mdele136(ausaf)
Lab5 (pfl) 20_mdele136(ausaf)
 
Embedded System Practical manual (1)
Embedded System Practical manual (1)Embedded System Practical manual (1)
Embedded System Practical manual (1)
 
c.v-updated(1)
c.v-updated(1)c.v-updated(1)
c.v-updated(1)
 
Yazan Al-Najjar MAJOR PROJECTS
Yazan Al-Najjar MAJOR PROJECTSYazan Al-Najjar MAJOR PROJECTS
Yazan Al-Najjar MAJOR PROJECTS
 
FreqLeak
FreqLeakFreqLeak
FreqLeak
 
Report for weather pi
Report for weather piReport for weather pi
Report for weather pi
 
IRJET- Development of Generalize Software to Estimate Cooling Load for Air Co...
IRJET- Development of Generalize Software to Estimate Cooling Load for Air Co...IRJET- Development of Generalize Software to Estimate Cooling Load for Air Co...
IRJET- Development of Generalize Software to Estimate Cooling Load for Air Co...
 
Programming with c language practical manual
Programming with c language practical manualProgramming with c language practical manual
Programming with c language practical manual
 
15LLP108_Demo4_LedBlinking.pdf1. Introduction In D.docx
15LLP108_Demo4_LedBlinking.pdf1. Introduction In D.docx15LLP108_Demo4_LedBlinking.pdf1. Introduction In D.docx
15LLP108_Demo4_LedBlinking.pdf1. Introduction In D.docx
 
ahmed saad cv
ahmed saad cvahmed saad cv
ahmed saad cv
 
Anup2
Anup2Anup2
Anup2
 
Chapter 5 notes new
Chapter 5 notes newChapter 5 notes new
Chapter 5 notes new
 
Real-Time Monitoring of Industrial Environmental Temperature using LabVIEW
Real-Time Monitoring of Industrial Environmental Temperature using LabVIEWReal-Time Monitoring of Industrial Environmental Temperature using LabVIEW
Real-Time Monitoring of Industrial Environmental Temperature using LabVIEW
 
I Work for free
I Work for freeI Work for free
I Work for free
 
Udayan_219209024_DA1001_FTP.pptx
Udayan_219209024_DA1001_FTP.pptxUdayan_219209024_DA1001_FTP.pptx
Udayan_219209024_DA1001_FTP.pptx
 
Data Acquisition
Data AcquisitionData Acquisition
Data Acquisition
 
Shah2019 chapter an_arduinomicro-controlleropera
Shah2019 chapter an_arduinomicro-controlleroperaShah2019 chapter an_arduinomicro-controlleropera
Shah2019 chapter an_arduinomicro-controlleropera
 
TEMPERATURE CONTROL AND DATA ACQUISITION METHOD FOR FACTORY USING LABVIEW
TEMPERATURE CONTROL AND DATA ACQUISITION METHOD FOR FACTORY USING LABVIEWTEMPERATURE CONTROL AND DATA ACQUISITION METHOD FOR FACTORY USING LABVIEW
TEMPERATURE CONTROL AND DATA ACQUISITION METHOD FOR FACTORY USING LABVIEW
 
Chapter 6 notes
Chapter 6 notesChapter 6 notes
Chapter 6 notes
 
SimScale to IES for Building Simulation
SimScale to IES for Building SimulationSimScale to IES for Building Simulation
SimScale to IES for Building Simulation
 

Recently uploaded

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17Celine George
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsSandeep D Chaudhary
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
Basic Intentional Injuries Health Education
Basic Intentional Injuries Health EducationBasic Intentional Injuries Health Education
Basic Intentional Injuries Health EducationNeilDeclaro1
 
Simple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdfSimple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdfstareducators107
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfDr Vijay Vishwakarma
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxJisc
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxmarlenawright1
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...Nguyen Thanh Tu Collection
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfPondicherry University
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 

Recently uploaded (20)

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 
Call Girls in Uttam Nagar (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in  Uttam Nagar (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in  Uttam Nagar (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in Uttam Nagar (delhi) call me [🔝9953056974🔝] escort service 24X7
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Basic Intentional Injuries Health Education
Basic Intentional Injuries Health EducationBasic Intentional Injuries Health Education
Basic Intentional Injuries Health Education
 
Simple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdfSimple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdf
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 

Lab2 (pfl) 20_mdele136(ausaf)

  • 1. Lab Report # 02 EE-112L - Programming Fundamentals Lab by Ausaf Ahmad Section: A Reg. # 20MDELE136 Class No.: 18 Instructor Engr. Jawad Ali Lecturer Department of Electrical Engineering, University of Engineering and Technology Mardan DATED: 04/04/2021
  • 2. Task: Taking Input at Run Time. Below is the code for converting the given temperature from Fahrenheit to Celsius. This code is taking input from user at run time. CODE: // Fahrenheit to Celsius in C // ----Lab Report # 02----- // ----20MDELE136----- // ----AUSAF AHMAD-----
  • 3. #include<stdio.h> int main() { printf("This program is taking input from user at run time as the user is required to given the temperature at run timen"); printf("n"); float fahrenheit, celsius; printf("Enter Temperature Value (in Fahrenheit): ");
  • 4. scanf("%f", &fahrenheit); celsius = (fahrenheit-32)/1.8; //formula for celsius to fahrenheit is: celsius = (fahrenheit-32)/(180/100) As 180/100=1.8 printf("nEquivalent Temperature (in Celsius) = %0.2f", celsius); return 0; }