Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a program that finds the temperature, as an integer , that is the same in

ID: 674967 • Letter: W

Question

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

written in c++ programming, the simplest way

Explanation / Answer

#include<iostream.h>
#include<conio.h>

void main()
{
   int c=100,f;
  
   for(c=100;c>=0;c--)
   {
       f=32+(9/5)*c;

       if(c==f)
       {
           cout<<c<<endl;

break;
       }
   }
   getch();
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote