SlideShare a Scribd company logo
1 of 1
Download to read offline
In this module, you learned about creating functions in C++ and how to combine functions with
the concepts covered in previous modules to solve problems.
For this assignment you will create a program converting Fahrenheit temperatures to Celsius
temperatures.
The formula for converting a temperature from Celsius to Fahrenheit is, multiply by 1.8 (or 9/5)
and add 32.:
F = C x 1.8 + 32 , where F is the Fahrenheit temperature and C is the Celsius temperature.
The formula for convert a temperature in degrees Fahrenheit to Celsius, subtract 32 and multiply
by .5556 (or 5/9).
C = (F - 32) x .5556 , where F is the Fahrenheit temperature and C is the Celsius temperature.
Write a function named f ahrenheitconverter that accepts a Celsius temperature as an argument
and returns the temperature converted to Fahrenheit.
Write a second function named celsiusconverter that accepts a Fahrenheit temperature as an
argument and returns the temperature converted to Celsius.
Demonstrate the functions by accepting the different temperatures from a user and displaying the
temperature converted to Fahrenheit and Celsius. Be sure to include comments throughout your
code where appropriate.
Make sure the output formatting is appropriate for the values provide

More Related Content

More from asravi1982

Indicate which of these structures might be found associated with cell.pdf
Indicate which of these structures might be found associated with cell.pdfIndicate which of these structures might be found associated with cell.pdf
Indicate which of these structures might be found associated with cell.pdfasravi1982
 
Inflation rates can be computed for overall indexes or for individual.pdf
Inflation rates can be computed for overall indexes or for individual.pdfInflation rates can be computed for overall indexes or for individual.pdf
Inflation rates can be computed for overall indexes or for individual.pdfasravi1982
 
Inequality in the distribution of income and wealth is increased by th.pdf
Inequality in the distribution of income and wealth is increased by th.pdfInequality in the distribution of income and wealth is increased by th.pdf
Inequality in the distribution of income and wealth is increased by th.pdfasravi1982
 
Ine 3 sin -31.pdf
Ine 3 sin -31.pdfIne 3 sin -31.pdf
Ine 3 sin -31.pdfasravi1982
 
Ineed just the answer 5) High concentration of solutes in the small.pdf
Ineed just the answer    5) High concentration of solutes in the small.pdfIneed just the answer    5) High concentration of solutes in the small.pdf
Ineed just the answer 5) High concentration of solutes in the small.pdfasravi1982
 
Industrialization is only possible when scientists focus on Question 4.pdf
Industrialization is only possible when scientists focus on Question 4.pdfIndustrialization is only possible when scientists focus on Question 4.pdf
Industrialization is only possible when scientists focus on Question 4.pdfasravi1982
 
Individuals who are able to lead their employees through a variety of.pdf
Individuals who are able to lead their employees through a variety of.pdfIndividuals who are able to lead their employees through a variety of.pdf
Individuals who are able to lead their employees through a variety of.pdfasravi1982
 
Individuals in a random sample of 150 were asked whether they supporte.pdf
Individuals in a random sample of 150 were asked whether they supporte.pdfIndividuals in a random sample of 150 were asked whether they supporte.pdf
Individuals in a random sample of 150 were asked whether they supporte.pdfasravi1982
 
Individual Assignment A framework for studying Organizational Behavior.pdf
Individual Assignment A framework for studying Organizational Behavior.pdfIndividual Assignment A framework for studying Organizational Behavior.pdf
Individual Assignment A framework for studying Organizational Behavior.pdfasravi1982
 
Indicate which of the following groups of genes typically creates a tr.pdf
Indicate which of the following groups of genes typically creates a tr.pdfIndicate which of the following groups of genes typically creates a tr.pdf
Indicate which of the following groups of genes typically creates a tr.pdfasravi1982
 
Increased emigration Increased immigration Increased birth rate Increa.pdf
Increased emigration Increased immigration Increased birth rate Increa.pdfIncreased emigration Increased immigration Increased birth rate Increa.pdf
Increased emigration Increased immigration Increased birth rate Increa.pdfasravi1982
 
Indigo Inc- is trying to determine whether to use the FIFO or average.pdf
Indigo Inc- is trying to determine whether to use the FIFO or average.pdfIndigo Inc- is trying to determine whether to use the FIFO or average.pdf
Indigo Inc- is trying to determine whether to use the FIFO or average.pdfasravi1982
 
Indicate whether the following audit procedure is a Test of Control (T (1).pdf
Indicate whether the following audit procedure is a Test of Control (T (1).pdfIndicate whether the following audit procedure is a Test of Control (T (1).pdf
Indicate whether the following audit procedure is a Test of Control (T (1).pdfasravi1982
 
Indicate the primary audit objective for the following audit procedure (1).pdf
Indicate the primary audit objective for the following audit procedure (1).pdfIndicate the primary audit objective for the following audit procedure (1).pdf
Indicate the primary audit objective for the following audit procedure (1).pdfasravi1982
 
In your opinion- does Bitcoin work better than fiat money- Please answ.pdf
In your opinion- does Bitcoin work better than fiat money- Please answ.pdfIn your opinion- does Bitcoin work better than fiat money- Please answ.pdf
In your opinion- does Bitcoin work better than fiat money- Please answ.pdfasravi1982
 
In which direction are secretory proteins transported through the Golg.pdf
In which direction are secretory proteins transported through the Golg.pdfIn which direction are secretory proteins transported through the Golg.pdf
In which direction are secretory proteins transported through the Golg.pdfasravi1982
 
In winter- Earth's axis- tilts away from the Sun is completely covered.pdf
In winter- Earth's axis- tilts away from the Sun is completely covered.pdfIn winter- Earth's axis- tilts away from the Sun is completely covered.pdf
In winter- Earth's axis- tilts away from the Sun is completely covered.pdfasravi1982
 
In Twitter v- Elon Musk- the basis of the original suit was a crime a.pdf
In Twitter v- Elon Musk- the basis of the original suit was a crime a.pdfIn Twitter v- Elon Musk- the basis of the original suit was a crime a.pdf
In Twitter v- Elon Musk- the basis of the original suit was a crime a.pdfasravi1982
 
In what ways are the development of adaptations constrained- How does.pdf
In what ways are the development of adaptations constrained- How does.pdfIn what ways are the development of adaptations constrained- How does.pdf
In what ways are the development of adaptations constrained- How does.pdfasravi1982
 
In two communities of similar size and age structure ( A and b-- there.pdf
In two communities of similar size and age structure ( A and b-- there.pdfIn two communities of similar size and age structure ( A and b-- there.pdf
In two communities of similar size and age structure ( A and b-- there.pdfasravi1982
 

More from asravi1982 (20)

Indicate which of these structures might be found associated with cell.pdf
Indicate which of these structures might be found associated with cell.pdfIndicate which of these structures might be found associated with cell.pdf
Indicate which of these structures might be found associated with cell.pdf
 
Inflation rates can be computed for overall indexes or for individual.pdf
Inflation rates can be computed for overall indexes or for individual.pdfInflation rates can be computed for overall indexes or for individual.pdf
Inflation rates can be computed for overall indexes or for individual.pdf
 
Inequality in the distribution of income and wealth is increased by th.pdf
Inequality in the distribution of income and wealth is increased by th.pdfInequality in the distribution of income and wealth is increased by th.pdf
Inequality in the distribution of income and wealth is increased by th.pdf
 
Ine 3 sin -31.pdf
Ine 3 sin -31.pdfIne 3 sin -31.pdf
Ine 3 sin -31.pdf
 
Ineed just the answer 5) High concentration of solutes in the small.pdf
Ineed just the answer    5) High concentration of solutes in the small.pdfIneed just the answer    5) High concentration of solutes in the small.pdf
Ineed just the answer 5) High concentration of solutes in the small.pdf
 
Industrialization is only possible when scientists focus on Question 4.pdf
Industrialization is only possible when scientists focus on Question 4.pdfIndustrialization is only possible when scientists focus on Question 4.pdf
Industrialization is only possible when scientists focus on Question 4.pdf
 
Individuals who are able to lead their employees through a variety of.pdf
Individuals who are able to lead their employees through a variety of.pdfIndividuals who are able to lead their employees through a variety of.pdf
Individuals who are able to lead their employees through a variety of.pdf
 
Individuals in a random sample of 150 were asked whether they supporte.pdf
Individuals in a random sample of 150 were asked whether they supporte.pdfIndividuals in a random sample of 150 were asked whether they supporte.pdf
Individuals in a random sample of 150 were asked whether they supporte.pdf
 
Individual Assignment A framework for studying Organizational Behavior.pdf
Individual Assignment A framework for studying Organizational Behavior.pdfIndividual Assignment A framework for studying Organizational Behavior.pdf
Individual Assignment A framework for studying Organizational Behavior.pdf
 
Indicate which of the following groups of genes typically creates a tr.pdf
Indicate which of the following groups of genes typically creates a tr.pdfIndicate which of the following groups of genes typically creates a tr.pdf
Indicate which of the following groups of genes typically creates a tr.pdf
 
Increased emigration Increased immigration Increased birth rate Increa.pdf
Increased emigration Increased immigration Increased birth rate Increa.pdfIncreased emigration Increased immigration Increased birth rate Increa.pdf
Increased emigration Increased immigration Increased birth rate Increa.pdf
 
Indigo Inc- is trying to determine whether to use the FIFO or average.pdf
Indigo Inc- is trying to determine whether to use the FIFO or average.pdfIndigo Inc- is trying to determine whether to use the FIFO or average.pdf
Indigo Inc- is trying to determine whether to use the FIFO or average.pdf
 
Indicate whether the following audit procedure is a Test of Control (T (1).pdf
Indicate whether the following audit procedure is a Test of Control (T (1).pdfIndicate whether the following audit procedure is a Test of Control (T (1).pdf
Indicate whether the following audit procedure is a Test of Control (T (1).pdf
 
Indicate the primary audit objective for the following audit procedure (1).pdf
Indicate the primary audit objective for the following audit procedure (1).pdfIndicate the primary audit objective for the following audit procedure (1).pdf
Indicate the primary audit objective for the following audit procedure (1).pdf
 
In your opinion- does Bitcoin work better than fiat money- Please answ.pdf
In your opinion- does Bitcoin work better than fiat money- Please answ.pdfIn your opinion- does Bitcoin work better than fiat money- Please answ.pdf
In your opinion- does Bitcoin work better than fiat money- Please answ.pdf
 
In which direction are secretory proteins transported through the Golg.pdf
In which direction are secretory proteins transported through the Golg.pdfIn which direction are secretory proteins transported through the Golg.pdf
In which direction are secretory proteins transported through the Golg.pdf
 
In winter- Earth's axis- tilts away from the Sun is completely covered.pdf
In winter- Earth's axis- tilts away from the Sun is completely covered.pdfIn winter- Earth's axis- tilts away from the Sun is completely covered.pdf
In winter- Earth's axis- tilts away from the Sun is completely covered.pdf
 
In Twitter v- Elon Musk- the basis of the original suit was a crime a.pdf
In Twitter v- Elon Musk- the basis of the original suit was a crime a.pdfIn Twitter v- Elon Musk- the basis of the original suit was a crime a.pdf
In Twitter v- Elon Musk- the basis of the original suit was a crime a.pdf
 
In what ways are the development of adaptations constrained- How does.pdf
In what ways are the development of adaptations constrained- How does.pdfIn what ways are the development of adaptations constrained- How does.pdf
In what ways are the development of adaptations constrained- How does.pdf
 
In two communities of similar size and age structure ( A and b-- there.pdf
In two communities of similar size and age structure ( A and b-- there.pdfIn two communities of similar size and age structure ( A and b-- there.pdf
In two communities of similar size and age structure ( A and b-- there.pdf
 

Recently uploaded

Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxJiesonDelaCerna
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentInMediaRes1
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitolTechU
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
MICROBIOLOGY biochemical test detailed.pptx
MICROBIOLOGY biochemical test detailed.pptxMICROBIOLOGY biochemical test detailed.pptx
MICROBIOLOGY biochemical test detailed.pptxabhijeetpadhi001
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 

Recently uploaded (20)

Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptx
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media Component
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
MICROBIOLOGY biochemical test detailed.pptx
MICROBIOLOGY biochemical test detailed.pptxMICROBIOLOGY biochemical test detailed.pptx
MICROBIOLOGY biochemical test detailed.pptx
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 

In this module- you learned about creating functions in C++ and how to.pdf

  • 1. In this module, you learned about creating functions in C++ and how to combine functions with the concepts covered in previous modules to solve problems. For this assignment you will create a program converting Fahrenheit temperatures to Celsius temperatures. The formula for converting a temperature from Celsius to Fahrenheit is, multiply by 1.8 (or 9/5) and add 32.: F = C x 1.8 + 32 , where F is the Fahrenheit temperature and C is the Celsius temperature. The formula for convert a temperature in degrees Fahrenheit to Celsius, subtract 32 and multiply by .5556 (or 5/9). C = (F - 32) x .5556 , where F is the Fahrenheit temperature and C is the Celsius temperature. Write a function named f ahrenheitconverter that accepts a Celsius temperature as an argument and returns the temperature converted to Fahrenheit. Write a second function named celsiusconverter that accepts a Fahrenheit temperature as an argument and returns the temperature converted to Celsius. Demonstrate the functions by accepting the different temperatures from a user and displaying the temperature converted to Fahrenheit and Celsius. Be sure to include comments throughout your code where appropriate. Make sure the output formatting is appropriate for the values provide