SlideShare uma empresa Scribd logo
1 de 10
2013

Project Report
Converter
(C - Language Program)
A brief report of our project “Converter” written in
C Language.

Submitted to:

Miss Farah Nawaz
Department of Computer Science
Newports Institute of Communications and Economics
Submitted by:

Zuhaib Ali (NI-S13-BS-040001)
Muhammad Shoaib (NI-F13-BS-040012)
Course:

Programming Techniques 1
Fall – 2013
Newports Institute of Communication and Economics
Project Report

Table of Contents
Acknowledgements................................................................................................................................. 1
Introduction ............................................................................................................................................ 1
Conversations ......................................................................................................................................... 1
Programming .......................................................................................................................................... 2
Header file........................................................................................................................................... 2
Switch case .......................................................................................................................................... 2
If- else statement ................................................................................................................................ 3
Custom function.................................................................................................................................. 3
Temperature ........................................................................................................................................... 4
Formulas ............................................................................................................................................. 4
Result .................................................................................................................................................. 5
Example...................................................................................................................................... 5
Time ........................................................................................................................................................ 5
Formulas ............................................................................................................................................. 6
Result .................................................................................................................................................. 6
Example...................................................................................................................................... 6
Length ..................................................................................................................................................... 6
Formulas ............................................................................................................................................. 7
Result .................................................................................................................................................. 7
Example...................................................................................................................................... 7
Flow Chart of Converter.......................................................................................................................... 8

Zuhaib Ali, Muhammad Shoaib

Page ii
Newports Institute of Communication and Economics
Project Report

Acknowledgements
The whole praise is to Almighty Allah, creator of this universe, who made us
the super creature with great knowledge. We, Zuhaib Ali, Muhammad Shoaib,
as a group of student of Newports Institute of Communication and Economics,
pays great thanks to our teacher Miss Farah Nawaz, who has given us the
golden opportunity to do this wonderful project, that helped us in doing a lot
of research and we came to know about so many new things and ideas.
In last but not the least, we would like to thank our parents and friends who
prayed for our success and encouraged us during this research period and
supporting us throughout our lives.

Introduction
During the fall 2013 semester, our teacher told us to create a program in Turbo
C Compiler using C Language. We decide to create a Converter that can
convert Temperature, Time and Length. Because in creating such a program we
can learn many new techniques about how to make program.
After we complete the program, now we really know many things that we
don’t know previous.

Conversations
In our program we have give three physical quantities to be converter from its
one unit to another. These physical quantities are listed below.


Temperature



Time



Length

Zuhaib Ali, Muhammad Shoaib

Page 1
Newports Institute of Communication and Economics
Project Report

Programming
In this section we will describe the program in programming aspect. Like what
is the technique working behind the program? And how the program actually
works?

Header file
In this program we have included only one header file that is Stdio.h.

Stdio.h file is the name of the standard library definition file for all Standard
Input, Output.

Switch case
We used switch case statement to make decisions or choices based on the
value of a conditional expression and specified cases.

Zuhaib Ali, Muhammad Shoaib

Page 2
Newports Institute of Communication and Economics
Project Report

If- else statement
Now we have used if-else statement the relational operators for making
comparisons, The if-else statement is used to express decisions,
expression

true Statement1
Next statement

If expression evaluates to false, Statement2 that follows the else keyword is
executed, and the program continues with Next_statement

Custom function
We have created 11 custom functions in our program.


Temperature
o Celsius to all
o Fahrenheit to all
o Kelvin to all



Time
o Day to all
o Hour to all
o Minute to all
o Second to all



Length
o Centimeter to all
o Foot to all
o Inch to all
o Meter to all

Zuhaib Ali, Muhammad Shoaib

Page 3
Newports Institute of Communication and Economics
Project Report

Temperature
Temperature is most common physical quantity; it is use to measure how of
hot or cold an object is. It may be measure in any of various units such as
Celsius, Fahrenheit, Kelvin, Rankine, Delisle, Newton, etc. We have given three
frequent used units in our program to converter from one to both others.
These units are listed below


Celsius



Fahrenheit



Kelvin

Formulas
The formulas used for temperature conversations in this program are as given
in below table.
From
Temperature
Fahrenheit

Kelvin

Celsius

=

(Fahrenheit-32)/1.8

Kelvin-273.15

Fahrenheit

Celsius*1.8

=

(Kelvin*1.8)-459.67

Kelvin

To

Celsius

Celsius+273.15

(Fahrenheit+459.67)/1.8

=

Zuhaib Ali, Muhammad Shoaib

Page 4
Newports Institute of Communication and Economics
Project Report

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
Time is another common physical quantity; the indefinite continued progress
of existence and events in the past, present, and future regarded as a
whole.Time is measured in hours and minute’sseconds, days, weeks, years,
decay, etc. We have given four units in our program to converter from one to
other three units. These units are listed below


Days



Hours



Minutes



Seconds

Zuhaib Ali, Muhammad Shoaib

Page 5
Newports Institute of Communication and Economics
Project Report

Formulas
The formulas used for time conversations in this program are as given in below
table.
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
Length is also another common physical quantity; that is used to measure
distance between two points.It is measured in foot, inch, kilometer, mile,
meter, millimeter, yard, etc. We have given four units in our program to
converter from one to both others. These units are listed below


Centimeter

Zuhaib Ali, Muhammad Shoaib

Page 6
Newports Institute of Communication and Economics
Project Report



Foot



Inch



Meter

Formulas
The formulas used for Length conversations in this program are as given in
below table.
From
Length
Foot

Inch

Meter

Centimeter

=

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

Zuhaib Ali, Muhammad Shoaib

Page 7
Newports Institute of Communication and Economics
Project Report

Flow Chart of Converter

Zuhaib Ali, Muhammad Shoaib

Page 8

Mais conteúdo relacionado

Mais procurados

Language processors
Language processorsLanguage processors
Language processors
eShikshak
 
4 evolution-of-programming-languages
4 evolution-of-programming-languages4 evolution-of-programming-languages
4 evolution-of-programming-languages
Rohit Shrivastava
 

Mais procurados (20)

Project Report on Employee Management System.docx
Project Report on Employee Management System.docxProject Report on Employee Management System.docx
Project Report on Employee Management System.docx
 
C Programming Project
C Programming ProjectC Programming Project
C Programming Project
 
Language translator
Language translatorLanguage translator
Language translator
 
Lecture 5 - Structured Programming Language
Lecture 5 - Structured Programming Language Lecture 5 - Structured Programming Language
Lecture 5 - Structured Programming Language
 
Interpreter
InterpreterInterpreter
Interpreter
 
Proposal for project ofdigital class in C++
Proposal for  project ofdigital class in C++Proposal for  project ofdigital class in C++
Proposal for project ofdigital class in C++
 
Language processors
Language processorsLanguage processors
Language processors
 
Types of Programming Languages
Types of Programming LanguagesTypes of Programming Languages
Types of Programming Languages
 
scientific calculator using c
scientific calculator using cscientific calculator using c
scientific calculator using c
 
Interpreter
InterpreterInterpreter
Interpreter
 
Quiz app (android) Documentation
Quiz app (android) DocumentationQuiz app (android) Documentation
Quiz app (android) Documentation
 
History of programming
History of programmingHistory of programming
History of programming
 
simple exercises in Macromedia flash 8
simple exercises in Macromedia flash 8simple exercises in Macromedia flash 8
simple exercises in Macromedia flash 8
 
online quiz application project presentation
online quiz application project presentationonline quiz application project presentation
online quiz application project presentation
 
Structure of a C program
Structure of a C programStructure of a C program
Structure of a C program
 
Computer
ComputerComputer
Computer
 
4 evolution-of-programming-languages
4 evolution-of-programming-languages4 evolution-of-programming-languages
4 evolution-of-programming-languages
 
System programming vs application programming
System programming vs application programmingSystem programming vs application programming
System programming vs application programming
 
FIT-Unit3 chapter2- Computer Languages
FIT-Unit3 chapter2- Computer LanguagesFIT-Unit3 chapter2- Computer Languages
FIT-Unit3 chapter2- Computer Languages
 
Differences between c and c++
Differences between c and c++Differences between c and c++
Differences between c and c++
 

Destaque

C programming project by navin thapa
C programming project by navin thapaC programming project by navin thapa
C programming project by navin thapa
Navinthp
 
Game genre and synopsis
Game genre and synopsisGame genre and synopsis
Game genre and synopsis
LewisB2013
 
Task 2 – game genre and synopsis
Task 2 – game genre and synopsisTask 2 – game genre and synopsis
Task 2 – game genre and synopsis
BenWhite101
 
First game using c language
First game using c languageFirst game using c language
First game using c language
Saurabh Khetan
 

Destaque (18)

C language mini project By Arbab Ahmed
C language mini project By Arbab AhmedC language mini project By Arbab Ahmed
C language mini project By Arbab Ahmed
 
Random Quiz Maker in C Language Project Slide
Random Quiz Maker in C Language Project SlideRandom Quiz Maker in C Language Project Slide
Random Quiz Maker in C Language Project Slide
 
C programming project by navin thapa
C programming project by navin thapaC programming project by navin thapa
C programming project by navin thapa
 
Ha2 game synopsis
Ha2 game synopsisHa2 game synopsis
Ha2 game synopsis
 
Burden game synopsis
Burden game synopsisBurden game synopsis
Burden game synopsis
 
Game genre and synopsis
Game genre and synopsisGame genre and synopsis
Game genre and synopsis
 
Task 2 – game genre and synopsis
Task 2 – game genre and synopsisTask 2 – game genre and synopsis
Task 2 – game genre and synopsis
 
Game synopsis
Game synopsisGame synopsis
Game synopsis
 
Profile Game C-NOW - ABCD
Profile Game C-NOW - ABCDProfile Game C-NOW - ABCD
Profile Game C-NOW - ABCD
 
Project Synopsis
Project SynopsisProject Synopsis
Project Synopsis
 
Synopsis or minor project ppt's (2)
Synopsis or minor project ppt's (2)Synopsis or minor project ppt's (2)
Synopsis or minor project ppt's (2)
 
Snake game implementation in c
Snake game implementation in cSnake game implementation in c
Snake game implementation in c
 
Synthesis of graphene
Synthesis of grapheneSynthesis of graphene
Synthesis of graphene
 
Application of Graphene in electronics
Application of Graphene in electronicsApplication of Graphene in electronics
Application of Graphene in electronics
 
Project synopsis
Project synopsisProject synopsis
Project synopsis
 
Project report
Project reportProject report
Project report
 
First game using c language
First game using c languageFirst game using c language
First game using c language
 
Sample project-synopsis
Sample project-synopsisSample project-synopsis
Sample project-synopsis
 

Semelhante a Converter - C- Language Program

Project Scope StatementProject NameStudent NameDateI.docx
Project Scope StatementProject NameStudent NameDateI.docxProject Scope StatementProject NameStudent NameDateI.docx
Project Scope StatementProject NameStudent NameDateI.docx
wkyra78
 
Implementation Of A Pre Study Phase Essay
Implementation Of A Pre Study Phase EssayImplementation Of A Pre Study Phase Essay
Implementation Of A Pre Study Phase Essay
Ashley Thomas
 
1. Which of the following is INCORRECT regarding the process capab.docx
1. Which of the following is INCORRECT regarding the process capab.docx1. Which of the following is INCORRECT regarding the process capab.docx
1. Which of the following is INCORRECT regarding the process capab.docx
jackiewalcutt
 
CP7301 Software Process and Project Management notes
CP7301 Software Process and Project Management   notesCP7301 Software Process and Project Management   notes
CP7301 Software Process and Project Management notes
AAKASH S
 
Introductory PresentationGoals of .docx
Introductory PresentationGoals of .docxIntroductory PresentationGoals of .docx
Introductory PresentationGoals of .docx
bagotjesusa
 
Problem Solving Techniques
Problem Solving TechniquesProblem Solving Techniques
Problem Solving Techniques
Ashesh R
 

Semelhante a Converter - C- Language Program (20)

Contact management system
Contact management systemContact management system
Contact management system
 
Project Scope StatementProject NameStudent NameDateI.docx
Project Scope StatementProject NameStudent NameDateI.docxProject Scope StatementProject NameStudent NameDateI.docx
Project Scope StatementProject NameStudent NameDateI.docx
 
Cs 568 Spring 10 Lecture 5 Estimation
Cs 568 Spring 10  Lecture 5 EstimationCs 568 Spring 10  Lecture 5 Estimation
Cs 568 Spring 10 Lecture 5 Estimation
 
Use case point ( Software Estimation Technique)
Use case point ( Software Estimation Technique)Use case point ( Software Estimation Technique)
Use case point ( Software Estimation Technique)
 
Exp 02-COCOMO (1).pptx
Exp 02-COCOMO (1).pptxExp 02-COCOMO (1).pptx
Exp 02-COCOMO (1).pptx
 
Costing ass4
Costing ass4Costing ass4
Costing ass4
 
Implementation Of A Pre Study Phase Essay
Implementation Of A Pre Study Phase EssayImplementation Of A Pre Study Phase Essay
Implementation Of A Pre Study Phase Essay
 
Book management system
Book management systemBook management system
Book management system
 
Avoiding state-space explosion in Model-Checker.pdf
Avoiding state-space explosion in Model-Checker.pdfAvoiding state-space explosion in Model-Checker.pdf
Avoiding state-space explosion in Model-Checker.pdf
 
How to build a good practice software project portfolio webversion
How to build a good practice software project portfolio   webversionHow to build a good practice software project portfolio   webversion
How to build a good practice software project portfolio webversion
 
1. Which of the following is INCORRECT regarding the process capab.docx
1. Which of the following is INCORRECT regarding the process capab.docx1. Which of the following is INCORRECT regarding the process capab.docx
1. Which of the following is INCORRECT regarding the process capab.docx
 
Software Engineering Fundamentals in Computer Science
Software Engineering Fundamentals in Computer ScienceSoftware Engineering Fundamentals in Computer Science
Software Engineering Fundamentals in Computer Science
 
CP7301 Software Process and Project Management notes
CP7301 Software Process and Project Management   notesCP7301 Software Process and Project Management   notes
CP7301 Software Process and Project Management notes
 
Introductory PresentationGoals of .docx
Introductory PresentationGoals of .docxIntroductory PresentationGoals of .docx
Introductory PresentationGoals of .docx
 
Problem Solving Techniques
Problem Solving TechniquesProblem Solving Techniques
Problem Solving Techniques
 
Slides chapters 24-25
Slides chapters 24-25Slides chapters 24-25
Slides chapters 24-25
 
Software Requirements Specification on Student Information System (SRS on SIS)
Software Requirements Specification on Student Information System (SRS on SIS)Software Requirements Specification on Student Information System (SRS on SIS)
Software Requirements Specification on Student Information System (SRS on SIS)
 
notes_Lecture7.ppt
notes_Lecture7.pptnotes_Lecture7.ppt
notes_Lecture7.ppt
 
Spm project planning
Spm project planning Spm project planning
Spm project planning
 
SE chapters 24-25
SE chapters 24-25SE chapters 24-25
SE chapters 24-25
 

Mais de Zuhaib Ali

Mais de 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
 

Último

Último (20)

From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
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
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
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
 
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
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 

Converter - C- Language Program

  • 1. 2013 Project Report Converter (C - Language Program) A brief report of our project “Converter” written in C Language. Submitted to: Miss Farah Nawaz Department of Computer Science Newports Institute of Communications and Economics Submitted by: Zuhaib Ali (NI-S13-BS-040001) Muhammad Shoaib (NI-F13-BS-040012) Course: Programming Techniques 1 Fall – 2013
  • 2. Newports Institute of Communication and Economics Project Report Table of Contents Acknowledgements................................................................................................................................. 1 Introduction ............................................................................................................................................ 1 Conversations ......................................................................................................................................... 1 Programming .......................................................................................................................................... 2 Header file........................................................................................................................................... 2 Switch case .......................................................................................................................................... 2 If- else statement ................................................................................................................................ 3 Custom function.................................................................................................................................. 3 Temperature ........................................................................................................................................... 4 Formulas ............................................................................................................................................. 4 Result .................................................................................................................................................. 5 Example...................................................................................................................................... 5 Time ........................................................................................................................................................ 5 Formulas ............................................................................................................................................. 6 Result .................................................................................................................................................. 6 Example...................................................................................................................................... 6 Length ..................................................................................................................................................... 6 Formulas ............................................................................................................................................. 7 Result .................................................................................................................................................. 7 Example...................................................................................................................................... 7 Flow Chart of Converter.......................................................................................................................... 8 Zuhaib Ali, Muhammad Shoaib Page ii
  • 3. Newports Institute of Communication and Economics Project Report Acknowledgements The whole praise is to Almighty Allah, creator of this universe, who made us the super creature with great knowledge. We, Zuhaib Ali, Muhammad Shoaib, as a group of student of Newports Institute of Communication and Economics, pays great thanks to our teacher Miss Farah Nawaz, who has given us the golden opportunity to do this wonderful project, that helped us in doing a lot of research and we came to know about so many new things and ideas. In last but not the least, we would like to thank our parents and friends who prayed for our success and encouraged us during this research period and supporting us throughout our lives. Introduction During the fall 2013 semester, our teacher told us to create a program in Turbo C Compiler using C Language. We decide to create a Converter that can convert Temperature, Time and Length. Because in creating such a program we can learn many new techniques about how to make program. After we complete the program, now we really know many things that we don’t know previous. Conversations In our program we have give three physical quantities to be converter from its one unit to another. These physical quantities are listed below.  Temperature  Time  Length Zuhaib Ali, Muhammad Shoaib Page 1
  • 4. Newports Institute of Communication and Economics Project Report Programming In this section we will describe the program in programming aspect. Like what is the technique working behind the program? And how the program actually works? Header file In this program we have included only one header file that is Stdio.h. Stdio.h file is the name of the standard library definition file for all Standard Input, Output. Switch case We used switch case statement to make decisions or choices based on the value of a conditional expression and specified cases. Zuhaib Ali, Muhammad Shoaib Page 2
  • 5. Newports Institute of Communication and Economics Project Report If- else statement Now we have used if-else statement the relational operators for making comparisons, The if-else statement is used to express decisions, expression true Statement1 Next statement If expression evaluates to false, Statement2 that follows the else keyword is executed, and the program continues with Next_statement Custom function We have created 11 custom functions in our program.  Temperature o Celsius to all o Fahrenheit to all o Kelvin to all  Time o Day to all o Hour to all o Minute to all o Second to all  Length o Centimeter to all o Foot to all o Inch to all o Meter to all Zuhaib Ali, Muhammad Shoaib Page 3
  • 6. Newports Institute of Communication and Economics Project Report Temperature Temperature is most common physical quantity; it is use to measure how of hot or cold an object is. It may be measure in any of various units such as Celsius, Fahrenheit, Kelvin, Rankine, Delisle, Newton, etc. We have given three frequent used units in our program to converter from one to both others. These units are listed below  Celsius  Fahrenheit  Kelvin Formulas The formulas used for temperature conversations in this program are as given in below table. From Temperature Fahrenheit Kelvin Celsius = (Fahrenheit-32)/1.8 Kelvin-273.15 Fahrenheit Celsius*1.8 = (Kelvin*1.8)-459.67 Kelvin To Celsius Celsius+273.15 (Fahrenheit+459.67)/1.8 = Zuhaib Ali, Muhammad Shoaib Page 4
  • 7. Newports Institute of Communication and Economics Project Report 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 Time is another common physical quantity; the indefinite continued progress of existence and events in the past, present, and future regarded as a whole.Time is measured in hours and minute’sseconds, days, weeks, years, decay, etc. We have given four units in our program to converter from one to other three units. These units are listed below  Days  Hours  Minutes  Seconds Zuhaib Ali, Muhammad Shoaib Page 5
  • 8. Newports Institute of Communication and Economics Project Report Formulas The formulas used for time conversations in this program are as given in below table. 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 Length is also another common physical quantity; that is used to measure distance between two points.It is measured in foot, inch, kilometer, mile, meter, millimeter, yard, etc. We have given four units in our program to converter from one to both others. These units are listed below  Centimeter Zuhaib Ali, Muhammad Shoaib Page 6
  • 9. Newports Institute of Communication and Economics Project Report  Foot  Inch  Meter Formulas The formulas used for Length conversations in this program are as given in below table. From Length Foot Inch Meter Centimeter = 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 Zuhaib Ali, Muhammad Shoaib Page 7
  • 10. Newports Institute of Communication and Economics Project Report Flow Chart of Converter Zuhaib Ali, Muhammad Shoaib Page 8