-
what loop use here?
converts Fahrenheit to Celsius temperature in increment of 5 degrees. The
initial value of Fahrenheit temperature and total conversion are to be made are requested
as user input.
and code is
Code:
#include "iostream"
using namespace std;
void main()
{
int inp;
cout<<"Enter how many time you want to convert temperature: ";
cin>>inp;
for(int i=1;i<=inp;i++)
{
float temp;
cout<<"enter fahrenheit value: ";
cin>>temp;
float cels=(5.0/9.0)*(temp-32.0);
cout<<temp<<" Fahrenheit converted to "<<cels<<" Celcius"<<endl;
}
}
i know this is not what it require but i am not understanding what that 5 degree increment means please guide me.
-
Cross-posted here. Obviously just wants to be spoon-fed the answer.
-
Yes, he also seems to need a map to figure out he is on the wrong forum.
-
you can use for loop or while loop or do/while loop. Any will be fine. Read in your book how to use those and then write the code for it. Shouldn't be difficult.