Thread: How to make this program?

  1. #1
    Registered User
    Join Date
    Mar 2019
    Posts
    9

    How to make this program?

    I have to make a program that tells a user to enter three positive integers and give them a least, middle and greatest value. How would I do that, since I tried a bunch of if and else if statements and it didn't work.

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    27,160
    Use a bunch of if and else if statements, it'll work
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered User
    Join Date
    Mar 2019
    Posts
    9
    I tried but it didn't work, how would using a bunch of em work haha

  4. #4
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    27,160
    What did you try and how do you know it didn't work?
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  5. #5
    TEIAM - problem solved
    Join Date
    Apr 2012
    Location
    Melbourne Australia
    Posts
    1,859
    It's important to show us what you've tried, otherwise we can't help fix your code
    Fact - Beethoven wrote his first symphony in C

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 6
    Last Post: 07-14-2012, 09:43 AM
  2. GNU - make program, what?
    By c_lady in forum C Programming
    Replies: 4
    Last Post: 03-27-2010, 12:06 PM
  3. Make window in VB but make program in C/C++?
    By Boomba in forum Windows Programming
    Replies: 1
    Last Post: 06-23-2004, 12:29 AM
  4. How To Make The Program Installed In Program Files Folder?
    By javacvb in forum Windows Programming
    Replies: 4
    Last Post: 11-05-2003, 05:33 PM
  5. Replies: 2
    Last Post: 03-25-2002, 05:49 AM

Tags for this Thread