CS35: Assignment 7

CS35: Programming and Problem Solving
Ray Ontko
Department of Computer Science
Earlham College

Due Friday, 1999/09/10

Reading Assignment

Read sections 3.1 through 3.6 of Deitel and Deitel. Optionally, read sections 3.1 through 3.3 of Kernighan and Ritchie.

Programming Exercise

If you haven't completed the exercise program for Assignment 6, please do so.

Otherwise, write a program which prompts the user for three integer numbers, and then prints the three numbers in ascending order regardless of the order in which they were entered.

When you run your program, the dialogue should look something like this:

$ ./sort_three
sort_three -- sorts three integer numbers into ascending order.

Enter the first number.
318
Enter the second number.
736
Enter the third number.
109

In order, the numbers are:
109
318
736
$

Copyright © 1999, Ray Ontko (rayo@ontko.com).