SlideShare a Scribd company logo
1 of 25
CONVERTER
C- Language Program


Presented to:

Miss Farah Nawaz
Computer Science Department
Newports Institute of Communication and Economics


Presented by:
Muhammad Shoaib
Zuhaib Ali



Coerce :
Programming Techniques 1
Fall 2013
CONVERTER


We have created a program “converter”.



The program is written in C Language.



That can converter Temperature, Time and Length.
MAIN MENU OF PROGRAM
PROGRAMMING
Converter (C - Language Program)
HEADER FILES


Only one header file is used in our program
SWITCH CASE


We have used a “Switch Case” in this program. And
give 4 cases.



Switch Case


Case 1 - Temperature



Case 2 - Time



Case 3 - Length



Case 4 - Exit
IF FUNCTION


In first 3 case we used
“If function”.



Temperature
 If Celsius
 Else if Fahrenheit
 Else if Kelvin

Time
 If Day
 Else if Hour
 Else if Minute
 Else if Second
 Length
 If Centimeter
 Else if Foot
 Else if Inch
 Else if Meter

CUSTOM FUNCTION


We have created 11 custom functions in our program.



Temperature






Time







Celsius to all
Fahrenheit to all
Kelvin to all

Day to all
Hour to all
Minute to all
Second to all

Length
Centimeter to all
 Foot to all
 Inch to all
 Meter to all

EXAMPLE OF CUSTOM FUNCTION
CelsiusToAll()
{
float Celsius,Fahrenheit,Kelvin;
clrscr();
printf("Enter Temperature in Celsius: ");
scanf("%f",&Celsius);
Fahrenheit=(1.8*Celsius)+32;
Kelvin=(Celsius+273.15);
printf("nTemperature in Fahrenheit : %.3f", Fahrenheit);
printf("nTemperature in Kelvin : %.3fn", Kelvin);
system("pause");
return 0;
}
FLOW CHART OF PROGRAM
TEMPERATURE
UNITS


In “Temperature Conversation” we have given 3
units.
Celsius
 Fahrenheit
 Kelvin

FORMULAS


The formulas used for temperature conversations in
this program are:
From
Temperature
Fahrenheit

Kelvin

Celsius
To

Celsius
=

(Fahrenheit-32)/1.8

Kelvin-273.15

Fahrenheit

Celsius*1.8

=

(Kelvin*1.8)-459.67

Kelvin

Celsius+273.15

(Fahrenheit+459.67)/1.8

=
RESULT
After selecting the input unit program the program
ask to enter temperature in selected unit and
calculate the result in other units and print it.
 Example:

TIME
UNITS


In “Time Conversation” we have given 4 units.
Days
 Hours
 Minutes
 Seconds

FORMULAS


The formulas used for time conversations in this
program are
From
Time
Hours

Minutes

Seconds

Days

=

Hours/24

Minutes/60/24

Seconds/60/60/24

Hours

Days*24

=

Minutes/60

Seconds/60/60

Minutes

Days*24*60

Hours*60

=

Seconds/60

Seconds

Days*24*60*60

Hours*60*60

Minutes*60

=

To

Days
RESULT
After selecting the input unit program the program
ask to enter time in selected unit and calculate the
result in other units and print it.
 Example:

LENGTH
UNITS


In “Length Conversation” we have given 4 units.
Centimeter
 Foot
 Inch
 Meter

FORMULAS


The formulas used for Length conversations in this
program are:
From
Length
Foot

Inch

Meter

Centimet
er

=

Foot*30.48

Inch/0.3937

Meter*100

Foot

Centimeter*0.033

=

Inch/12

Meter/0.3048

Inch

Centimeter*0.398

Foot*12

=

Meter/0.0254

Meter

Centimeter*100

Foot*0.3048

Inch/39.37

=

To

Centimeter
RESULT
After selecting the input unit program the program
ask to enter Length in selected unit and calculate
the result in other units and print it.
 Example:

PENFLIX
THANK YOU

More Related Content

What's hot

Std 10 computer chapter 10 introduction to c language (part1)
Std 10 computer chapter 10 introduction to c language (part1)Std 10 computer chapter 10 introduction to c language (part1)
Std 10 computer chapter 10 introduction to c language (part1)Nuzhat Memon
 
Conditional statement c++
Conditional statement c++Conditional statement c++
Conditional statement c++amber chaudary
 
Scientific calculator project in c language
Scientific calculator project in c languageScientific calculator project in c language
Scientific calculator project in c languageAMIT KUMAR
 
Unit Converter Java project
Unit Converter Java projectUnit Converter Java project
Unit Converter Java projectShahariar Rabby
 
Intro to functional programming
Intro to functional programmingIntro to functional programming
Intro to functional programmingAssaf Gannon
 
Why C is Called Structured Programming Language
Why C is Called Structured Programming LanguageWhy C is Called Structured Programming Language
Why C is Called Structured Programming LanguageSinbad Konick
 
Simple Calendar Application using C
Simple Calendar Application using CSimple Calendar Application using C
Simple Calendar Application using Ccodewithc
 
06. operator overloading
06. operator overloading06. operator overloading
06. operator overloadingHaresh Jaiswal
 
FUNCTIONS IN c++ PPT
FUNCTIONS IN c++ PPTFUNCTIONS IN c++ PPT
FUNCTIONS IN c++ PPT03062679929
 
C programming project by navin thapa
C programming project by navin thapaC programming project by navin thapa
C programming project by navin thapaNavinthp
 
Dictionary project report.docx
Dictionary project report.docxDictionary project report.docx
Dictionary project report.docxkishoreadhikari2
 
C and its errors
C and its errorsC and its errors
C and its errorsJunaid Raja
 
10. switch case
10. switch case10. switch case
10. switch caseWay2itech
 

What's hot (20)

Std 10 computer chapter 10 introduction to c language (part1)
Std 10 computer chapter 10 introduction to c language (part1)Std 10 computer chapter 10 introduction to c language (part1)
Std 10 computer chapter 10 introduction to c language (part1)
 
Component Diagram
Component DiagramComponent Diagram
Component Diagram
 
Conditional statement c++
Conditional statement c++Conditional statement c++
Conditional statement c++
 
Scientific calculator project in c language
Scientific calculator project in c languageScientific calculator project in c language
Scientific calculator project in c language
 
Unit Converter Java project
Unit Converter Java projectUnit Converter Java project
Unit Converter Java project
 
Control statement-Selective
Control statement-SelectiveControl statement-Selective
Control statement-Selective
 
Function in c
Function in cFunction in c
Function in c
 
Function
FunctionFunction
Function
 
Intro to functional programming
Intro to functional programmingIntro to functional programming
Intro to functional programming
 
Why C is Called Structured Programming Language
Why C is Called Structured Programming LanguageWhy C is Called Structured Programming Language
Why C is Called Structured Programming Language
 
Simple Calendar Application using C
Simple Calendar Application using CSimple Calendar Application using C
Simple Calendar Application using C
 
06. operator overloading
06. operator overloading06. operator overloading
06. operator overloading
 
FUNCTIONS IN c++ PPT
FUNCTIONS IN c++ PPTFUNCTIONS IN c++ PPT
FUNCTIONS IN c++ PPT
 
C programming project by navin thapa
C programming project by navin thapaC programming project by navin thapa
C programming project by navin thapa
 
Fourier series
Fourier seriesFourier series
Fourier series
 
Dictionary project report.docx
Dictionary project report.docxDictionary project report.docx
Dictionary project report.docx
 
C and its errors
C and its errorsC and its errors
C and its errors
 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programming
 
Chap 01-1 jwfiles
Chap 01-1 jwfilesChap 01-1 jwfiles
Chap 01-1 jwfiles
 
10. switch case
10. switch case10. switch case
10. switch case
 

Similar to Converter - C- Language Program

Temperature Converter is leay and I.pptx
Temperature Converter is leay and I.pptxTemperature Converter is leay and I.pptx
Temperature Converter is leay and I.pptxasimshahzad8611
 
Performance analysis(Time & Space Complexity)
Performance analysis(Time & Space Complexity)Performance analysis(Time & Space Complexity)
Performance analysis(Time & Space Complexity)swapnac12
 
Bottom of FormCreate your own FunctionFunctionsFor eac.docx
Bottom of FormCreate your own FunctionFunctionsFor eac.docxBottom of FormCreate your own FunctionFunctionsFor eac.docx
Bottom of FormCreate your own FunctionFunctionsFor eac.docxAASTHA76
 
Object oriented programming 12 programming steps in cpp and example
Object oriented programming 12 programming steps in cpp and exampleObject oriented programming 12 programming steps in cpp and example
Object oriented programming 12 programming steps in cpp and exampleVaibhav Khanna
 
CMIS 102 Hands-On LabWeek 6OverviewThis hands-on lab .docx
CMIS 102 Hands-On LabWeek 6OverviewThis hands-on lab .docxCMIS 102 Hands-On LabWeek 6OverviewThis hands-on lab .docx
CMIS 102 Hands-On LabWeek 6OverviewThis hands-on lab .docxclarebernice
 
Comp 122 lab 5 lab report and source code
Comp 122 lab 5 lab report and source codeComp 122 lab 5 lab report and source code
Comp 122 lab 5 lab report and source codepradesigali1
 
Basic Programming concepts - Programming with C++
Basic Programming concepts - Programming with C++Basic Programming concepts - Programming with C++
Basic Programming concepts - Programming with C++Mohamed El Desouki
 
detail of flowchart and algorithm that are used in programmingpdf
detail of flowchart and algorithm that are used in programmingpdfdetail of flowchart and algorithm that are used in programmingpdf
detail of flowchart and algorithm that are used in programmingpdfssuserf86fba
 
Algorithm Flowchart Manual ALGORITHM FLOWCHART MANUAL For STUDENTS
Algorithm   Flowchart Manual ALGORITHM   FLOWCHART MANUAL For STUDENTSAlgorithm   Flowchart Manual ALGORITHM   FLOWCHART MANUAL For STUDENTS
Algorithm Flowchart Manual ALGORITHM FLOWCHART MANUAL For STUDENTSAlicia Edwards
 
Evaluation of computer performance
Evaluation of computer performanceEvaluation of computer performance
Evaluation of computer performancePrasenjit Dey
 
An Energy-Efficient Climate Control Solution for Smart Buildings Based on Pre...
An Energy-Efficient Climate Control Solution for Smart Buildings Based on Pre...An Energy-Efficient Climate Control Solution for Smart Buildings Based on Pre...
An Energy-Efficient Climate Control Solution for Smart Buildings Based on Pre...omar_afify
 
Programming preparation_stepping Algorithm
Programming preparation_stepping AlgorithmProgramming preparation_stepping Algorithm
Programming preparation_stepping Algorithmleneinterno
 
Modeling separation systems_with_aspen_plus
Modeling separation systems_with_aspen_plusModeling separation systems_with_aspen_plus
Modeling separation systems_with_aspen_plusTecna
 

Similar to Converter - C- Language Program (20)

Temperature Converter is leay and I.pptx
Temperature Converter is leay and I.pptxTemperature Converter is leay and I.pptx
Temperature Converter is leay and I.pptx
 
02.softwareengr.ppt
02.softwareengr.ppt02.softwareengr.ppt
02.softwareengr.ppt
 
03b loops
03b   loops03b   loops
03b loops
 
Performance analysis(Time & Space Complexity)
Performance analysis(Time & Space Complexity)Performance analysis(Time & Space Complexity)
Performance analysis(Time & Space Complexity)
 
Bottom of FormCreate your own FunctionFunctionsFor eac.docx
Bottom of FormCreate your own FunctionFunctionsFor eac.docxBottom of FormCreate your own FunctionFunctionsFor eac.docx
Bottom of FormCreate your own FunctionFunctionsFor eac.docx
 
Object oriented programming 12 programming steps in cpp and example
Object oriented programming 12 programming steps in cpp and exampleObject oriented programming 12 programming steps in cpp and example
Object oriented programming 12 programming steps in cpp and example
 
CMIS 102 Hands-On LabWeek 6OverviewThis hands-on lab .docx
CMIS 102 Hands-On LabWeek 6OverviewThis hands-on lab .docxCMIS 102 Hands-On LabWeek 6OverviewThis hands-on lab .docx
CMIS 102 Hands-On LabWeek 6OverviewThis hands-on lab .docx
 
Comp 122 lab 5 lab report and source code
Comp 122 lab 5 lab report and source codeComp 122 lab 5 lab report and source code
Comp 122 lab 5 lab report and source code
 
Programming Fundamental handouts
Programming Fundamental handoutsProgramming Fundamental handouts
Programming Fundamental handouts
 
Basic Programming concepts - Programming with C++
Basic Programming concepts - Programming with C++Basic Programming concepts - Programming with C++
Basic Programming concepts - Programming with C++
 
detail of flowchart and algorithm that are used in programmingpdf
detail of flowchart and algorithm that are used in programmingpdfdetail of flowchart and algorithm that are used in programmingpdf
detail of flowchart and algorithm that are used in programmingpdf
 
Algorithm Flowchart Manual ALGORITHM FLOWCHART MANUAL For STUDENTS
Algorithm   Flowchart Manual ALGORITHM   FLOWCHART MANUAL For STUDENTSAlgorithm   Flowchart Manual ALGORITHM   FLOWCHART MANUAL For STUDENTS
Algorithm Flowchart Manual ALGORITHM FLOWCHART MANUAL For STUDENTS
 
Algorithm manual
Algorithm manualAlgorithm manual
Algorithm manual
 
Evaluation of computer performance
Evaluation of computer performanceEvaluation of computer performance
Evaluation of computer performance
 
An Energy-Efficient Climate Control Solution for Smart Buildings Based on Pre...
An Energy-Efficient Climate Control Solution for Smart Buildings Based on Pre...An Energy-Efficient Climate Control Solution for Smart Buildings Based on Pre...
An Energy-Efficient Climate Control Solution for Smart Buildings Based on Pre...
 
finalpaper.doc
finalpaper.docfinalpaper.doc
finalpaper.doc
 
Programming preparation_stepping Algorithm
Programming preparation_stepping AlgorithmProgramming preparation_stepping Algorithm
Programming preparation_stepping Algorithm
 
Modeling separation systems_with_aspen_plus
Modeling separation systems_with_aspen_plusModeling separation systems_with_aspen_plus
Modeling separation systems_with_aspen_plus
 
Visual Basic
Visual BasicVisual Basic
Visual Basic
 
Visual Basic
Visual BasicVisual Basic
Visual Basic
 

More from Zuhaib Ali

The Skill Enhancement Institute
The Skill Enhancement InstituteThe Skill Enhancement Institute
The Skill Enhancement InstituteZuhaib Ali
 
Project report k&n’s
Project report k&n’sProject report k&n’s
Project report k&n’sZuhaib Ali
 
The curse of mummy’s tomb – Goosebumps
The curse of mummy’s tomb – GoosebumpsThe curse of mummy’s tomb – Goosebumps
The curse of mummy’s tomb – GoosebumpsZuhaib Ali
 
Servis - Shoes for everyone..
Servis - Shoes for everyone..Servis - Shoes for everyone..
Servis - Shoes for everyone..Zuhaib Ali
 
Professor Muhammad Yunus
Professor Muhammad YunusProfessor Muhammad Yunus
Professor Muhammad YunusZuhaib Ali
 
Importance of Computer in Common man’s life in Society
Importance of Computer in Common man’s life in SocietyImportance of Computer in Common man’s life in Society
Importance of Computer in Common man’s life in SocietyZuhaib Ali
 

More from Zuhaib Ali (11)

The Skill Enhancement Institute
The Skill Enhancement InstituteThe Skill Enhancement Institute
The Skill Enhancement Institute
 
Trade key
Trade keyTrade key
Trade key
 
Project report k&n’s
Project report k&n’sProject report k&n’s
Project report k&n’s
 
The curse of mummy’s tomb – Goosebumps
The curse of mummy’s tomb – GoosebumpsThe curse of mummy’s tomb – Goosebumps
The curse of mummy’s tomb – Goosebumps
 
Shezad roy
Shezad royShezad roy
Shezad roy
 
Sound
Sound Sound
Sound
 
Trade key
Trade keyTrade key
Trade key
 
Servis - Shoes for everyone..
Servis - Shoes for everyone..Servis - Shoes for everyone..
Servis - Shoes for everyone..
 
Professor Muhammad Yunus
Professor Muhammad YunusProfessor Muhammad Yunus
Professor Muhammad Yunus
 
Importance of Computer in Common man’s life in Society
Importance of Computer in Common man’s life in SocietyImportance of Computer in Common man’s life in Society
Importance of Computer in Common man’s life in Society
 
Gauss’s Law
Gauss’s LawGauss’s Law
Gauss’s Law
 

Recently uploaded

Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 

Recently uploaded (20)

Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 

Converter - C- Language Program

  • 2.  Presented to: Miss Farah Nawaz Computer Science Department Newports Institute of Communication and Economics  Presented by: Muhammad Shoaib Zuhaib Ali  Coerce : Programming Techniques 1 Fall 2013
  • 3. CONVERTER  We have created a program “converter”.  The program is written in C Language.  That can converter Temperature, Time and Length.
  • 4. MAIN MENU OF PROGRAM
  • 5. PROGRAMMING Converter (C - Language Program)
  • 6. HEADER FILES  Only one header file is used in our program
  • 7. SWITCH CASE  We have used a “Switch Case” in this program. And give 4 cases.  Switch Case  Case 1 - Temperature  Case 2 - Time  Case 3 - Length  Case 4 - Exit
  • 8. IF FUNCTION  In first 3 case we used “If function”.  Temperature  If Celsius  Else if Fahrenheit  Else if Kelvin Time  If Day  Else if Hour  Else if Minute  Else if Second  Length  If Centimeter  Else if Foot  Else if Inch  Else if Meter 
  • 9. CUSTOM FUNCTION  We have created 11 custom functions in our program.  Temperature     Time      Celsius to all Fahrenheit to all Kelvin to all Day to all Hour to all Minute to all Second to all Length Centimeter to all  Foot to all  Inch to all  Meter to all 
  • 10. EXAMPLE OF CUSTOM FUNCTION CelsiusToAll() { float Celsius,Fahrenheit,Kelvin; clrscr(); printf("Enter Temperature in Celsius: "); scanf("%f",&Celsius); Fahrenheit=(1.8*Celsius)+32; Kelvin=(Celsius+273.15); printf("nTemperature in Fahrenheit : %.3f", Fahrenheit); printf("nTemperature in Kelvin : %.3fn", Kelvin); system("pause"); return 0; }
  • 11. FLOW CHART OF PROGRAM
  • 13. UNITS  In “Temperature Conversation” we have given 3 units. Celsius  Fahrenheit  Kelvin 
  • 14. FORMULAS  The formulas used for temperature conversations in this program are: From Temperature Fahrenheit Kelvin Celsius To Celsius = (Fahrenheit-32)/1.8 Kelvin-273.15 Fahrenheit Celsius*1.8 = (Kelvin*1.8)-459.67 Kelvin Celsius+273.15 (Fahrenheit+459.67)/1.8 =
  • 15. RESULT After selecting the input unit program the program ask to enter temperature in selected unit and calculate the result in other units and print it.  Example: 
  • 16. TIME
  • 17. UNITS  In “Time Conversation” we have given 4 units. Days  Hours  Minutes  Seconds 
  • 18. FORMULAS  The formulas used for time conversations in this program are From Time Hours Minutes Seconds Days = Hours/24 Minutes/60/24 Seconds/60/60/24 Hours Days*24 = Minutes/60 Seconds/60/60 Minutes Days*24*60 Hours*60 = Seconds/60 Seconds Days*24*60*60 Hours*60*60 Minutes*60 = To Days
  • 19. RESULT After selecting the input unit program the program ask to enter time in selected unit and calculate the result in other units and print it.  Example: 
  • 21. UNITS  In “Length Conversation” we have given 4 units. Centimeter  Foot  Inch  Meter 
  • 22. FORMULAS  The formulas used for Length conversations in this program are: From Length Foot Inch Meter Centimet er = Foot*30.48 Inch/0.3937 Meter*100 Foot Centimeter*0.033 = Inch/12 Meter/0.3048 Inch Centimeter*0.398 Foot*12 = Meter/0.0254 Meter Centimeter*100 Foot*0.3048 Inch/39.37 = To Centimeter
  • 23. RESULT After selecting the input unit program the program ask to enter Length in selected unit and calculate the result in other units and print it.  Example: 