Ok so this is my first program ive written. Its a Celsius to Fahrenheit converter. Its the first code example in the book I bought C++ without Fear. I did the code exactly as the book showed, the program loads up and ask me to enter a celsius #... when I enter the number and press enter it closes the dos screen. Heres what my code looks like, does anyone know whats wrong with it? Heres the code:
Code:
#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;
    
}
Sorry, im new and I can't see whats wrong. Can anyone help me? Thanks