For statement problem

hello, new to C++ and well... forums.

i have a problem where i need to convert Fahrenheit to Celsius and show a certain number of conversions. it is user inputed.
so if i had:

enter temp: 20
enter number of conversions: 5
FARHEN CEL
20 -3
25 -7
30 " "
40 " "
50 " "

this is what i have so far, im not very good, and i dont fully understand the for statement so i really need help : / ::



#include <iostream>
#include <iomanip>
using namespace std;

int main()
{

int count, conv;
double f, c;
count = 0;

for ( ; count <=20 ; count = count + 1)
{
conv = 0;
for ( ;conv <=20 ; count = conv +1)
{
cout<<"Enter in Temperature: ";
cin>> f;
cout<<"Enter in number of conversions: ";
cin>> conv;

count = 0;
}
c = (5.0/9.0)*(f-32.0);
f = f + 4;
cout<<setw(1) <<f<<endl;
cout<<setw(10)<<c<<endl;
}


system("PAUSE");
return 0;

closed account (zb0S216C)
count = count + 1

Replacing this with count++ will have the same effect.

What do you need help with?
i need to make it so when the user inputs a number, it displays the number of conversions entered.
Topic archived. No new replies allowed.