Description
EEE 212
LAB 2 – Section1 – Even
Part A. [30 points]
Write a program to accept an input string of 9 characters from the keypad and display them on the first row of the LCD screen based on the following table:
Input Displayed
0-9 0-9
A l
B o
C g
* (
# )
Part B [70 points]
Write a program to calculate the logarithm with base of 4 of an integer ranging in [0,150). For this purpose, as an example, we input log(120) which appears in the first row, and the result is displayed in the second row as 3.45 with 2 fractional digits displayed. The input will always have 8 characters, i.e. even if we input two digit or one digit numbers such as 53 or 4 they will be written as log(053) and log(004). You don’t have to consider invalid inputs that are not in the form of log(XXX).
Use the lookup table solution for this problem. The table for this question is provided to you on Moodle.
Reviews
There are no reviews yet.