18 lines
304 B
C
18 lines
304 B
C
|
#include <stdio.h>
|
||
|
#include <stdlib.h>
|
||
|
|
||
|
int main(void){
|
||
|
int x = 0;
|
||
|
int y = 0;
|
||
|
int z = 0;
|
||
|
printf("Rentrer un entier >= 0: ");
|
||
|
scanf("%d",&x);
|
||
|
printf("Rentrer un entier > 0: ");
|
||
|
scanf("%d",&y);
|
||
|
while (x > y) {
|
||
|
z++;
|
||
|
x=x-y;
|
||
|
}
|
||
|
printf("%d = %d x %d + %d",((y*z)+x),y,z,x);
|
||
|
return EXIT_SUCCESS;
|
||
|
}
|