27 lines
518 B
C
27 lines
518 B
C
|
#include <stdio.h>
|
||
|
#include <stdlib.h>
|
||
|
|
||
|
int main(void) {
|
||
|
int arg1, arg2, arg3;
|
||
|
|
||
|
printf("Veuillez entrer un entier positif : ");
|
||
|
scanf("%d", &arg1);
|
||
|
arg3 = arg1;
|
||
|
|
||
|
printf("Veuillez entrer un entier supérieur à 0 : ");
|
||
|
scanf("%d", &arg2);
|
||
|
|
||
|
int quotient, reste;
|
||
|
quotient = 0;
|
||
|
|
||
|
while ( arg1 >= arg2 ) {
|
||
|
quotient++;
|
||
|
arg1 -= arg2;
|
||
|
}
|
||
|
|
||
|
reste = arg1;
|
||
|
printf("La division euclidienne de %d par %d est : \n", arg3, arg2);
|
||
|
printf("Quotient : %d\n", quotient);
|
||
|
printf("Reste : %d\n", reste);
|
||
|
}
|