10076 - Lab02   

Description

The input will be a floating point number X which has 2 digits on the left of the point, and 3 digits on the right of the point. X consists of digits 1-9 except 0.
Interchange the two sides of point, and map the number to 'A' - 'I'.

Example:
Input: 46.534
after interchanging: 534.46
after mapping: ECD.DF

Hint:
You should do rounding before converting 'float' to 'int'

#include 

int main()
{
    int a;
    float b;

    a = (int) round(b); 
}

Input

Given a floating point number X.

Output

The mapping result.

Note that you do not need to print ‘\n’ at the end of the output.

Sample Input  Download

Sample Output  Download

Tags




Discuss