to display three positive numbers in asending order on c++

Discussion in 'Meet and Greet' started by aysha.shah01, Oct 16, 2011.

  1. aysha.shah01

    aysha.shah01 New Member

    Joined:
    Oct 16, 2011
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    I was given a assingment to complete on dev c++ but i am having difficulty to do so. could someone plz tell me how to do this on dev c++?

    >Develop a console based C++ program called sort.cpp that asks the user to input three positive
    whole numbers, and then displays the numbers in ascending order.
    The program should ask the user to input three whole positive numbers in the range 0 to 1000.
    If the user enters valid numbers, the program should determine the lowest of the numbers and
    display this number, then display the next lowest number and finally the highest of the numbers
    should be displayed. If the user enters an invalid value for any of the numbers, an error message
    should be displayed and the program terminates.
    Compile, run and test your program for a number of test cases, including both valid and invalid
    input data


    i would need something like this:
    #include <iostream>
    using namespace std;
    int main
    {
    //program.....
    return 0;
    }
    thanks
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice