Reputation: 21
OBJECTIVE: Sort Two Numbers
Practice using basic flowchart symbols correctly;
Start/Stop
Output
Input
Process
Decision
Use simple variables.
Specify an algorithm to solve a problem.
I've been trying to figure what to put in the process box to have it sort two numbers thats my main problem.
Upvotes: 1
Views: 11629
Reputation: 4525
Take a look at this.. You can add a condtion for the equal value.. or you can modify this if you want to have more inputs
Upvotes: 2
Reputation: 1036
To sort numbers, we must compare them 2 at a time. If you have to sort only two numbers then you just have to compare them once by using >, <, >=, <=. Choose any one of these comparators, then proceed further by changing positions of the numbers according to the required order (ascending/descending). Tell me if I have missed something.
Upvotes: 1