In the module "Arithmetic Expressions" we talked about the features of the division operation in C ++.
Recall that for integer data (type int), you can use two division operations.
/ - integer division, when the fractional part is discarded as a result of the division operation
% - calculation of the remainder of the division

ЗАПОМНИМ!

n C and C ++, the result of dividing an integer by an integer is always an integer, the remainder when dividing is discarded.

Пример:
int a, b;
a = 10;
b = 3;
int c = a / b;   // Answer: с = 3
int d = a% b;    // Answer: d = 1
These operations are very important in programming. They need to be understood and used correctly. And this requires practice!

 

Task
Time limit: 1000 ms,
Memory limit: 256 Mb

Write a program that, given the two numbers a and b, outputs the result of integer division and the remainder in the given format (see examples)

Input:  a and b
Output
in first line - the result of integer division a and b
in second line - remainder of the division a on b
Format is given in example

Пример входных и выходных данных
Входные данные
15 6
Выходные данные
15/6=2
15%6=3

Auto CHOOSE THE PROGRAMMING NECESSARY LANGUAGE!
Attach the program source file:
or enter the source code in the language:

Rules for designing programs and a list of errors during automatic task verification
           

Results: