Unhappyc++ code problems

Posts 13 of 3 · Page 1 of 1
c++ code problems
Ok i was making my script and following instructions to and here is what i entered:
#include <iostream>
using namespace std;

int main() {
double ctemp, ftemp;

cout << "Input a celsius temp and press enter: ";
cin >> ctemp;
ftemp = (ctemp * 1.8) + 32;
cout << "Fahrenheit temp is: " <<ftemp;

return 0;
}
__________________________________________________ ____
And so after i enter it and compile it it only says the first part and lets me enter something then closes right after!What is wrong!!!!!
because it has nothing else to do ?
put system("PAUSE") instead of return 0 , but try not to use this when your programs get more complicated , but you will figure that out on your own.
Posts 13 of 3 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

Need help?