Question: Program Description Write and test a MASM program to perform the following tasks: Display the program title and programmer s name. Get the user's name,
Program Description
Write and test a MASM program to perform the following tasks:
Display the program title and programmers name.
Get the user's name, and greet the user.
Display instructions for the user.
Use a loop to prompt the user to enter temperature readings, in Celsius.
Validate each user input to be in the range inclusiveNotify the user of any invalid entries not in the range specified and discard invalid entries. The same error message may be used for both "too cold" and "too hot".
As each valid temperature is accepted, determine which of the following categories it falls into, and maintain a count of how many temperature readings fall into each category
Cold: Less than CCool: C to CWarm: C to CHot: Above C
When all temperature readings have been entered, calculate the rounded integer average of the valid temperature readings and store it in a variable. Hint: Add each temperature reading into an accumulator after validation, and only calculate the average after all valid temperature inputs are received
Display:
the maximum valid temperature readingthe minimum valid temperature readingthe average of all seven valid temperature readings, rounded to the nearest integer
NOTE: Round midpoints n to theright on the number line:
rounds to rounds to Other noninteger results just round to the nearest integer value
The total number of temperature readings in each temperature categorya parting message with the users name.
Program Requirements
The Min Temp, Max Temp, and each Category's count must each be stored in named variables as they are calculated. The Average variable works best as an accumulator until all valid temperature readings are given, and the average is calculated after this point.
The main procedure must be modularized into commented logical sections procedures are not required this time
The two input range limits ie and and the three classification limits ie and must be defined as constants.
Notes
This is an integer program. Even though it may make more sense to use floatingpoint computations, you are required to use signed integer computations.
You do not need arrays to complete this program and you do not yet have the tools to use arrays. Trying to use arrays will just make it harder!
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
