you guys i need help please!!!!!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nick77
    New Member
    • Jun 2007
    • 1

    you guys i need help please!!!!!

    yo guys please help..... ive been trying to solve this pro for days:

    Write a C++ program to convert temperature from degree Celsius (TC) to

    1) degrees Fahrenheit (TF) or

    2 degrees Kelvin (TK), or

    3) degrees Rankin (TR).

    Your program should have the following features:

    1) Displays a short message to the user describing the purpose of the program and prompt the user to enter the temperature in TC.

    2) Display a menu and allow the user to select which temperature they want to convert to, TF or TK or TR. The user should exit the program by typing the character tilde (i.e. ~) available in the keyboard.

    3) Based on user selection of convertion temperature (TF, or TK or TR), your program should calculate the requested temperature and display the resut.

    4) Your program should allow the user to continue the selection for as long as he/she wants and only exit if they select the tilde (~) as described in number (2) above.
  • Benny the Guard
    New Member
    • Jun 2007
    • 92

    #2
    Are you having difficulty with all of it or were you able to get some of it to work? The policy on here is to not give full on solutions to school projects, but we sure can help. Heres somethings to get you started.

    1. You can use cout << to push things to the screen. Such as
    Code:
    cout << "Hello World" << endl;
    the endl just means end-of-line.

    2. You can use cin to input values from the user. For example:

    Code:
    string choice_str;
    cin >> choice_str;
    3. After you get the data you wil just do the math to convert, not sure of the conversion factors but they should be easily accesible on the net.

    4. You can setup a while loop to keep asking for choices.

    If you have some more specific questions let us know.

    Comment

    • archonmagnus
      New Member
      • Jun 2007
      • 113

      #3
      So, what is your question? Do you need the conversion equations? Do you need help with reading keyboard input? Since this is worded like a homework question, I won't post code here. But, I (and others, I'm sure) will help if you have a general question.

      These conversions should get you started:
      (As this part isn't really code, I think this would be a valid amount of help)
      F = 1.8 * C + 32
      R = F + 459.67
      K = C + 273.15
      R = 1.8 * K

      (F = Farenheit, C = Celsius, K = Kelvin, R = Rankine)

      Comment

      • plemoine
        New Member
        • Jun 2007
        • 15

        #4
        Read some C++ books.

        Originally posted by archonmagnus
        So, what is your question? Do you need the conversion equations? Do you need help with reading keyboard input? Since this is worded like a homework question, I won't post code here. But, I (and others, I'm sure) will help if you have a general question.

        These conversions should get you started:
        (As this part isn't really code, I think this would be a valid amount of help)
        F = 1.8 * C + 32
        R = F + 459.67
        K = C + 273.15
        R = 1.8 * K

        (F = Farenheit, C = Celsius, K = Kelvin, R = Rankine)

        Comment

        Working...