One possible approach:by Solitaire (Login Solitaire1)
The following algorithm assumes the user will be inputting the numbers. If you have a prepared list of numbers, you need a different approach.
1. Set the minimum to the highest possible number and the maximum to the lowest.
2. Start a FOR loop to repeat 5 times.
3. Get the number.
4. Use two IF blocks to compare the number to the minimum and maximum and reassign those values as needed.
5. Total all the numbers entered.
6. After the loop ends, divide the total by 5 to get the average.
Note: No one here will write the code for you. You must make an effort to write the program yourself and post the code you have so far. Then ask for help with the specific part of the program that's giving you trouble.
|Response Title||Author and Date|
|This is not my homework...||HC on Feb 25|
|and||HC on Feb 25|
|What ugly code!||Solitaire on Feb 25|
|LOL...||on Feb 25|
|well||HC on Feb 26|
|AND ALSO||hc on Feb 26|
|...||HC on Feb 26|
|You need to get a base value for max and min.||Solitaire on Feb 26|
|* The less than symbol < won't display in posts :-P||on Feb 26|
|whoa||HC on Feb 26|
|* DIM defines the variable type||on Feb 27|
|Variables must be defined by type in most languages.||Solitaire on Feb 27|
|Thanks!||HC on Feb 27|