Results 1 to 3 of 3
  1. #1
    mark.t's Avatar
    Join Date
    Nov 2008
    Gender
    male
    Posts
    3
    Reputation
    10
    Thanks
    1

    Unhappy 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!!!!!

  2. #2
    GG2GG's Avatar
    Join Date
    Mar 2008
    Gender
    male
    Location
    United Kingdom
    Posts
    3,382
    Reputation
    21
    Thanks
    4,294,967,295
    My Mood
    Blah
    because it has nothing else to do ?

  3. #3
    rooski's Avatar
    Join Date
    Aug 2008
    Gender
    male
    Location
    Siberia?
    Posts
    55
    Reputation
    10
    Thanks
    0
    My Mood
    Lurking
    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.

Similar Threads

  1. [HELP] Admin menu / Coding problem
    By Raffeman in forum Other Programming
    Replies: 15
    Last Post: 09-01-2010, 08:45 AM
  2. Menu code problem. Cannot open include file: 'Base.h'
    By westomat in forum Combat Arms Help
    Replies: 12
    Last Post: 08-02-2010, 05:34 AM
  3. Code Problem
    By Sydney in forum Combat Arms EU Hack Coding/Source Code
    Replies: 3
    Last Post: 07-28-2010, 08:59 AM
  4. coding problem:help me
    By hunter1118 in forum Combat Arms Hack Coding / Programming / Source Code
    Replies: 8
    Last Post: 04-20-2010, 08:27 PM
  5. Premium C++ coding problem
    By killerld in forum WarRock - International Hacks
    Replies: 1
    Last Post: 07-24-2009, 07:04 PM

Tags for this Thread