Due date: Thursday, February 5, 2004.
Ex. 1. This program will be converting a time value from the
military notation (0 to 23) into the usual notation (am-pm).
- Input the time as hours and minutes (2 values) in the military
notation (0 to 23).
- Check if the values are correct (the hours should be between 0 and
23, the minutes between 0 and 59). If the values are incorrect, give
the user an error message and that's all.
- If the values are correct, convert them to the a.m. -
p.m. notation. For example, the 16h15 in the military notation
translates into 4h15 p.m. You don't need to store the converted
values, only to output them.
Ex. 2. Translate the following numbers considering the
unsigned binary representation in both cases:
- 57, 15, and 203 into the binary base,
- 1101, 0110, and 10110001 into the decimal base.
Send me: Source file with an example of program execution as
a comment, and the results from Ex. 2 in the email.