606 - CS135501_I2P2014_LAB_2 Scoreboard

Time

2014/09/29 16:00:00 2014/09/29 17:00:00

Clarification

# Problem Asker Description Reply Replier Reply Time For all team

# Problem Pass Rate (passed user / total user)
10054 quotient and remainder

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