csci 10 :: programming challenge 2 (due wed, aug 31)
Format your documentation and HLA source code using hla_starter.txt as a style guide.
Write, compile, and execute a complete HLA program that does the following:
- [15 points] has neat and consistent documentation and source code formatting
[15 points] declares two (2) static uns8 (unsigned 8-bit integer) variables
and one (1) char variable
- [15 points] greets the user
- [15 points] uses a forever loop to allow the user to repeat the program
[30 points] uses repeat...until loops to handle user input -- limits the range of input values to 1−50; prompts the user for each of the uns8 values and stores each value in one of the uns8 variables declares above
[45 points] uses an if..elseif..else statement to compare the two values (hint: since you cannot perform a direct memory-to-memory comparison, one of these values must be loaded into a register) and outputs one of the following messages, depending on the result of the comparison (substitute the actual input values for X and Y):
- "The first number (X) is greater than the second number (Y)."
- "The second number (Y) is greater than the first number (X)."
- "The first number (X) is equivalent to the second number (Y)."
[15 points] ask the user if she/he wants to continue and use the char variable to store the input (hint: you will probably need to use stdin.flushInput() here) -- break if no, continue if yes
WARNING: if your code will not compile you will get a zero (0) on the assignment.
Submitting your work:
Email your .hla file only (do NOT send the .exe) to me at firstname.lastname@example.org.
Total points for this challenge: