Struggling with a program

Just wondering if anyone here could help me coding this. I am a rookie in C
++, just started learning it about a week ago. HAALP!

Write a program (filename sort.cpp) that does the following:
• Prompt the user and let them enter three integers
• Store them in three variables.
• Ask the user whether they want to sort in ascending (smallest to largest) or descending (largest to smallest) order.
• Print the numbers in sorted order, as requested by the user.
• Follow the example output exactly
• Allow the user to type uppercase or lowercase letters when choosing from the menu (so ’A’ or ’a’ for ascending and ’D’ or ’d’ for descending)
• If the user inputs an invalid option, print a message and end the program.
• Hint: You may want three additional variables to store the integers in a sorted order, as this makes for fewer print statements and less repeated code throughout the program (you can use one print statement for each ordering this way).
Last edited on
Review your class notes; those will help you best.
Look at online tutorials about the subjects you are having trouble with.
Return here to post what you have done and we can help untangle some errors.
Topic archived. No new replies allowed.