I dont get c++ and i need help doing something that is simple

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sharpercurl
    New Member
    • Sep 2006
    • 2

    I dont get c++ and i need help doing something that is simple

    I need to write a program the promts the user to input a decimal number and the program should then output the decimal and the corresponding integer
    i don't know where to start
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    Are you familar with cin and cout?

    How about printf and fgets (or gets)?

    Comment

    • sharpercurl
      New Member
      • Sep 2006
      • 2

      #3
      Originally posted by Banfa
      Are you familar with cin and cout?

      How about printf and fgets (or gets)?
      yes but I don't know how to use them I know that that sounds alittle silly, but I need help

      Comment

      • Banfa
        Recognized Expert Expert
        • Feb 2006
        • 9067

        #4
        float f;

        cout << "Enter Number: "
        cin >>f;
        cout << "\n" << f << " <-> " << (int)f;

        Comment

        Working...