10054 - quotient and remainder   

Description

Input two positive integers, X and Y.  Both are smaller than 100.
Output the quotient (Q) and the reminder (R) of X/Y.
The output format is "X=Y*Q+R".

Represent those four numbers in the 2-digit letter format,
which uses 'A' for 0, 'B' for 1, 'C' for 2, 'D' for 3, 'E' for 4, 'F'
for  5, 'G' for 6, 'H' for 7, 'I' for 8, and 'J' for 9.

 
Hint:

#include 
int main()
{

	char ch[10] = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J'};

        /* you can declare 4 varibles, for x, y, Q, R,  and 4 arrays, each size of 2 */
        
        /* add your code here */

        return 0;
}

 

Remember "\n" in the end when printing the result.

Input

 Two positive integers, X and Y.  Both are smaller than 100.

Output

 X=Y*Q+R in the 2-digit letter format.

Sample Input  Download

Sample Output  Download

Tags




Discuss