BUT2/DEV/DEV1.1/TP_Reels/programme6.c

16 lines
293 B
C
Raw Normal View History

2023-10-23 13:23:36 +02:00
#include <stdio.h>
#include <stdlib.h>
int main(void) {
int nb=5;
int resultat=0;
while(nb > 0) {
printf("%d", nb);
nb -= 1;
printf("Donnez moi un chiffre : ");
resultat = resultat + scanf("%lf\n", &resultat);
printf("%d", resultat);
}
printf("%d", resultat);
}