Question: Problem 1: Programming Project No. 2 (Page 202): In a certain code language, numerals are each represented by a symbol or a letter. They are
Problem 1: Programming Project No. 2 (Page 202):
In a certain code language, numerals are each represented by a symbol or a letter. They are as follows
| Numeral | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
| Symbol code | * | B | E | A | @ | F | K | % | R | M |
Numerals are to be coded as per the codes in the table and the following conditions:
a. If the first and the last digits are odd, both are to be coded as X.
b. If the first and the last digits are even, both are to be coded as $.
c. If the last digit is 0, it is to be coded as #.
For example, 487692 is coded as $R%KM$
Write a program that takes as input a sequence of numbers and displays the corresponding code to represent it.
PLEASE NO ARRAYS
loops or if statments palese
java
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
