SlideShare a Scribd company logo
1 of 1
Download to read offline
C++
Write a program that finds the temperature, as an integer , that is the same in both Celsius and
Fahrenheit. The formula to convert from Celsius to Fahrenheit is: Fahrenheit = 32 + (nine fifths)
times Celsius.
Your program should create two integer variables for the temperature in Celsius and
Fahrenheit. Initialize the temperature to 100 degrees Celsius. In a loop, decrement the Celsius
value and compute the corresponding temperature in Fahrenheit until the two values are the
same.
Output should be:
The temperature is the same at -40
Solution
/* C++ Program with proper comments that finds the temperature, as an integer , that is the
same in both Celsius and Fahrenheit. */ #include using namespace std; /*When we don't use
the std namespace, the computer will try to call cout or cin as if it weren't defined in a
namespace (as most functions in our codes). Since it doesn't exist there, the computer tries to
call something that doesn't exist! Hence, an error occurs.*/ int toFahrenheit( int celsius ) {
return ( ( 9.0 / 5 ) * celsius + 32 ); //returning the value of temp converted from C to F } int
main() { int celsius; //temp variable in celsius int fahrenheit; //temp variable in Fahrenheit
celsius = 100; while ( ( fahrenheit = toFahrenheit( celsius ) ) != celsius ) { celsius--;
//keep decrementing celsius value until both values become equal } cout << "The
temperature is the same at " << celsius // print same temp value with << endl;
// required message return 0; }

More Related Content

Similar to C++Write a program that finds the temperature, as an integer , tha.pdf

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
 
Csc1100 lecture05 ch05
Csc1100 lecture05 ch05Csc1100 lecture05 ch05
Csc1100 lecture05 ch05IIUM
 
A function definition num_digits with Cpp programnum_digits.cpp#.pdf
A function definition num_digits with Cpp programnum_digits.cpp#.pdfA function definition num_digits with Cpp programnum_digits.cpp#.pdf
A function definition num_digits with Cpp programnum_digits.cpp#.pdfanand1213
 
ConversionDemo.javaimport java.util.;package for scanner class.pdf
ConversionDemo.javaimport java.util.;package for scanner class.pdfConversionDemo.javaimport java.util.;package for scanner class.pdf
ConversionDemo.javaimport java.util.;package for scanner class.pdfmukhtaransarcloth
 
OverviewThis hands-on lab allows you to follow and experiment w.docx
OverviewThis hands-on lab allows you to follow and experiment w.docxOverviewThis hands-on lab allows you to follow and experiment w.docx
OverviewThis hands-on lab allows you to follow and experiment w.docxgerardkortney
 

Similar to C++Write a program that finds the temperature, as an integer , tha.pdf (6)

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
 
Csc1100 lecture05 ch05
Csc1100 lecture05 ch05Csc1100 lecture05 ch05
Csc1100 lecture05 ch05
 
A function definition num_digits with Cpp programnum_digits.cpp#.pdf
A function definition num_digits with Cpp programnum_digits.cpp#.pdfA function definition num_digits with Cpp programnum_digits.cpp#.pdf
A function definition num_digits with Cpp programnum_digits.cpp#.pdf
 
ConversionDemo.javaimport java.util.;package for scanner class.pdf
ConversionDemo.javaimport java.util.;package for scanner class.pdfConversionDemo.javaimport java.util.;package for scanner class.pdf
ConversionDemo.javaimport java.util.;package for scanner class.pdf
 
A01
A01A01
A01
 
OverviewThis hands-on lab allows you to follow and experiment w.docx
OverviewThis hands-on lab allows you to follow and experiment w.docxOverviewThis hands-on lab allows you to follow and experiment w.docx
OverviewThis hands-on lab allows you to follow and experiment w.docx
 

More from eyewaregallery

in C++ , Design a linked list class named IntegerList to hold a seri.pdf
in C++ , Design a linked list class named IntegerList to hold a seri.pdfin C++ , Design a linked list class named IntegerList to hold a seri.pdf
in C++ , Design a linked list class named IntegerList to hold a seri.pdfeyewaregallery
 
In addition to the fossil record, what other kinds of evidence reinfo.pdf
In addition to the fossil record, what other kinds of evidence reinfo.pdfIn addition to the fossil record, what other kinds of evidence reinfo.pdf
In addition to the fossil record, what other kinds of evidence reinfo.pdfeyewaregallery
 
How much 0.521 M NaOH will be needed to raise the pH of 0.161 L of 4.pdf
How much 0.521 M NaOH will be needed to raise the pH of 0.161 L of 4.pdfHow much 0.521 M NaOH will be needed to raise the pH of 0.161 L of 4.pdf
How much 0.521 M NaOH will be needed to raise the pH of 0.161 L of 4.pdfeyewaregallery
 
I am writing a program that places bolcks on a grid the the sape of .pdf
I am writing a program that places bolcks on a grid the the sape of .pdfI am writing a program that places bolcks on a grid the the sape of .pdf
I am writing a program that places bolcks on a grid the the sape of .pdfeyewaregallery
 
How do teams bring value to an organizationHow are high performin.pdf
How do teams bring value to an organizationHow are high performin.pdfHow do teams bring value to an organizationHow are high performin.pdf
How do teams bring value to an organizationHow are high performin.pdfeyewaregallery
 
how can we use empricism to figure out if a fact is trueSolutio.pdf
how can we use empricism to figure out if a fact is trueSolutio.pdfhow can we use empricism to figure out if a fact is trueSolutio.pdf
how can we use empricism to figure out if a fact is trueSolutio.pdfeyewaregallery
 
Gene RegulationFunction of transcription factor domains, i.e. DNA.pdf
Gene RegulationFunction of transcription factor domains, i.e. DNA.pdfGene RegulationFunction of transcription factor domains, i.e. DNA.pdf
Gene RegulationFunction of transcription factor domains, i.e. DNA.pdfeyewaregallery
 
For each step of DNA replication, predict the outcome ifconcentra.pdf
For each step of DNA replication, predict the outcome ifconcentra.pdfFor each step of DNA replication, predict the outcome ifconcentra.pdf
For each step of DNA replication, predict the outcome ifconcentra.pdfeyewaregallery
 
Explain THREE unique characteristics of fungi.SolutionThree un.pdf
Explain THREE unique characteristics of fungi.SolutionThree un.pdfExplain THREE unique characteristics of fungi.SolutionThree un.pdf
Explain THREE unique characteristics of fungi.SolutionThree un.pdfeyewaregallery
 
Explain the basic relationship between humans and microorganisms.pdf
Explain the basic relationship between humans and microorganisms.pdfExplain the basic relationship between humans and microorganisms.pdf
Explain the basic relationship between humans and microorganisms.pdfeyewaregallery
 
discuss the rationale for the global harmonization of financial repo.pdf
discuss the rationale for the global harmonization of financial repo.pdfdiscuss the rationale for the global harmonization of financial repo.pdf
discuss the rationale for the global harmonization of financial repo.pdfeyewaregallery
 
Describe the need to multitask in BBC (behavior-based control) syste.pdf
Describe the need to multitask in BBC (behavior-based control) syste.pdfDescribe the need to multitask in BBC (behavior-based control) syste.pdf
Describe the need to multitask in BBC (behavior-based control) syste.pdfeyewaregallery
 
A spinner with 7 equally sized slices is shown below. The dial is spu.pdf
A spinner with 7 equally sized slices is shown below. The dial is spu.pdfA spinner with 7 equally sized slices is shown below. The dial is spu.pdf
A spinner with 7 equally sized slices is shown below. The dial is spu.pdfeyewaregallery
 
ble below to calculate the Gross Domestic Product uning the ral Gro.pdf
ble below to calculate the Gross Domestic Product uning the ral Gro.pdfble below to calculate the Gross Domestic Product uning the ral Gro.pdf
ble below to calculate the Gross Domestic Product uning the ral Gro.pdfeyewaregallery
 
1.The limbic systemA. matures before the prefrontal cortexB. is.pdf
1.The limbic systemA. matures before the prefrontal cortexB. is.pdf1.The limbic systemA. matures before the prefrontal cortexB. is.pdf
1.The limbic systemA. matures before the prefrontal cortexB. is.pdfeyewaregallery
 
Why is leadership a critical factor in implementing change and qua.pdf
Why is leadership a critical factor in implementing change and qua.pdfWhy is leadership a critical factor in implementing change and qua.pdf
Why is leadership a critical factor in implementing change and qua.pdfeyewaregallery
 
Why are there bubbles in beer and champagneSolution Bubbles of .pdf
Why are there bubbles in beer and champagneSolution  Bubbles of .pdfWhy are there bubbles in beer and champagneSolution  Bubbles of .pdf
Why are there bubbles in beer and champagneSolution Bubbles of .pdfeyewaregallery
 
Which of the following is true of a traditional master budget a. It.pdf
Which of the following is true of a traditional master budget a. It.pdfWhich of the following is true of a traditional master budget a. It.pdf
Which of the following is true of a traditional master budget a. It.pdfeyewaregallery
 
Which ethnic groups were a part of the former YugoslaviaCroats, S.pdf
Which ethnic groups were a part of the former YugoslaviaCroats, S.pdfWhich ethnic groups were a part of the former YugoslaviaCroats, S.pdf
Which ethnic groups were a part of the former YugoslaviaCroats, S.pdfeyewaregallery
 
What would the components of the development be in an early learning.pdf
What would the components of the development be in an early learning.pdfWhat would the components of the development be in an early learning.pdf
What would the components of the development be in an early learning.pdfeyewaregallery
 

More from eyewaregallery (20)

in C++ , Design a linked list class named IntegerList to hold a seri.pdf
in C++ , Design a linked list class named IntegerList to hold a seri.pdfin C++ , Design a linked list class named IntegerList to hold a seri.pdf
in C++ , Design a linked list class named IntegerList to hold a seri.pdf
 
In addition to the fossil record, what other kinds of evidence reinfo.pdf
In addition to the fossil record, what other kinds of evidence reinfo.pdfIn addition to the fossil record, what other kinds of evidence reinfo.pdf
In addition to the fossil record, what other kinds of evidence reinfo.pdf
 
How much 0.521 M NaOH will be needed to raise the pH of 0.161 L of 4.pdf
How much 0.521 M NaOH will be needed to raise the pH of 0.161 L of 4.pdfHow much 0.521 M NaOH will be needed to raise the pH of 0.161 L of 4.pdf
How much 0.521 M NaOH will be needed to raise the pH of 0.161 L of 4.pdf
 
I am writing a program that places bolcks on a grid the the sape of .pdf
I am writing a program that places bolcks on a grid the the sape of .pdfI am writing a program that places bolcks on a grid the the sape of .pdf
I am writing a program that places bolcks on a grid the the sape of .pdf
 
How do teams bring value to an organizationHow are high performin.pdf
How do teams bring value to an organizationHow are high performin.pdfHow do teams bring value to an organizationHow are high performin.pdf
How do teams bring value to an organizationHow are high performin.pdf
 
how can we use empricism to figure out if a fact is trueSolutio.pdf
how can we use empricism to figure out if a fact is trueSolutio.pdfhow can we use empricism to figure out if a fact is trueSolutio.pdf
how can we use empricism to figure out if a fact is trueSolutio.pdf
 
Gene RegulationFunction of transcription factor domains, i.e. DNA.pdf
Gene RegulationFunction of transcription factor domains, i.e. DNA.pdfGene RegulationFunction of transcription factor domains, i.e. DNA.pdf
Gene RegulationFunction of transcription factor domains, i.e. DNA.pdf
 
For each step of DNA replication, predict the outcome ifconcentra.pdf
For each step of DNA replication, predict the outcome ifconcentra.pdfFor each step of DNA replication, predict the outcome ifconcentra.pdf
For each step of DNA replication, predict the outcome ifconcentra.pdf
 
Explain THREE unique characteristics of fungi.SolutionThree un.pdf
Explain THREE unique characteristics of fungi.SolutionThree un.pdfExplain THREE unique characteristics of fungi.SolutionThree un.pdf
Explain THREE unique characteristics of fungi.SolutionThree un.pdf
 
Explain the basic relationship between humans and microorganisms.pdf
Explain the basic relationship between humans and microorganisms.pdfExplain the basic relationship between humans and microorganisms.pdf
Explain the basic relationship between humans and microorganisms.pdf
 
discuss the rationale for the global harmonization of financial repo.pdf
discuss the rationale for the global harmonization of financial repo.pdfdiscuss the rationale for the global harmonization of financial repo.pdf
discuss the rationale for the global harmonization of financial repo.pdf
 
Describe the need to multitask in BBC (behavior-based control) syste.pdf
Describe the need to multitask in BBC (behavior-based control) syste.pdfDescribe the need to multitask in BBC (behavior-based control) syste.pdf
Describe the need to multitask in BBC (behavior-based control) syste.pdf
 
A spinner with 7 equally sized slices is shown below. The dial is spu.pdf
A spinner with 7 equally sized slices is shown below. The dial is spu.pdfA spinner with 7 equally sized slices is shown below. The dial is spu.pdf
A spinner with 7 equally sized slices is shown below. The dial is spu.pdf
 
ble below to calculate the Gross Domestic Product uning the ral Gro.pdf
ble below to calculate the Gross Domestic Product uning the ral Gro.pdfble below to calculate the Gross Domestic Product uning the ral Gro.pdf
ble below to calculate the Gross Domestic Product uning the ral Gro.pdf
 
1.The limbic systemA. matures before the prefrontal cortexB. is.pdf
1.The limbic systemA. matures before the prefrontal cortexB. is.pdf1.The limbic systemA. matures before the prefrontal cortexB. is.pdf
1.The limbic systemA. matures before the prefrontal cortexB. is.pdf
 
Why is leadership a critical factor in implementing change and qua.pdf
Why is leadership a critical factor in implementing change and qua.pdfWhy is leadership a critical factor in implementing change and qua.pdf
Why is leadership a critical factor in implementing change and qua.pdf
 
Why are there bubbles in beer and champagneSolution Bubbles of .pdf
Why are there bubbles in beer and champagneSolution  Bubbles of .pdfWhy are there bubbles in beer and champagneSolution  Bubbles of .pdf
Why are there bubbles in beer and champagneSolution Bubbles of .pdf
 
Which of the following is true of a traditional master budget a. It.pdf
Which of the following is true of a traditional master budget a. It.pdfWhich of the following is true of a traditional master budget a. It.pdf
Which of the following is true of a traditional master budget a. It.pdf
 
Which ethnic groups were a part of the former YugoslaviaCroats, S.pdf
Which ethnic groups were a part of the former YugoslaviaCroats, S.pdfWhich ethnic groups were a part of the former YugoslaviaCroats, S.pdf
Which ethnic groups were a part of the former YugoslaviaCroats, S.pdf
 
What would the components of the development be in an early learning.pdf
What would the components of the development be in an early learning.pdfWhat would the components of the development be in an early learning.pdf
What would the components of the development be in an early learning.pdf
 

Recently uploaded

ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
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
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...jaredbarbolino94
 
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
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
MICROBIOLOGY biochemical test detailed.pptx
MICROBIOLOGY biochemical test detailed.pptxMICROBIOLOGY biochemical test detailed.pptx
MICROBIOLOGY biochemical test detailed.pptxabhijeetpadhi001
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
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
 
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
 

Recently uploaded (20)

OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.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
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...
 
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
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
MICROBIOLOGY biochemical test detailed.pptx
MICROBIOLOGY biochemical test detailed.pptxMICROBIOLOGY biochemical test detailed.pptx
MICROBIOLOGY biochemical test detailed.pptx
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
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
 
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
 

C++Write a program that finds the temperature, as an integer , tha.pdf

  • 1. C++ Write a program that finds the temperature, as an integer , that is the same in both Celsius and Fahrenheit. The formula to convert from Celsius to Fahrenheit is: Fahrenheit = 32 + (nine fifths) times Celsius. Your program should create two integer variables for the temperature in Celsius and Fahrenheit. Initialize the temperature to 100 degrees Celsius. In a loop, decrement the Celsius value and compute the corresponding temperature in Fahrenheit until the two values are the same. Output should be: The temperature is the same at -40 Solution /* C++ Program with proper comments that finds the temperature, as an integer , that is the same in both Celsius and Fahrenheit. */ #include using namespace std; /*When we don't use the std namespace, the computer will try to call cout or cin as if it weren't defined in a namespace (as most functions in our codes). Since it doesn't exist there, the computer tries to call something that doesn't exist! Hence, an error occurs.*/ int toFahrenheit( int celsius ) { return ( ( 9.0 / 5 ) * celsius + 32 ); //returning the value of temp converted from C to F } int main() { int celsius; //temp variable in celsius int fahrenheit; //temp variable in Fahrenheit celsius = 100; while ( ( fahrenheit = toFahrenheit( celsius ) ) != celsius ) { celsius--; //keep decrementing celsius value until both values become equal } cout << "The temperature is the same at " << celsius // print same temp value with << endl; // required message return 0; }