From 29ee1f20bfaf4208d0f75dee2dca6fac5eeff907 Mon Sep 17 00:00:00 2001 From: moogin Date: Tue, 17 Sep 2024 15:06:12 +0200 Subject: [PATCH] rajout de boucle et mise a jour de condition --- DEV1.1/boucles.c | 61 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 DEV1.1/boucles.c diff --git a/DEV1.1/boucles.c b/DEV1.1/boucles.c new file mode 100644 index 0000000..3209524 --- /dev/null +++ b/DEV1.1/boucles.c @@ -0,0 +1,61 @@ +#include +#include + +/*int main(void){ + int x = 0; + int y = 0; + int difference = 0; + int i; + + printf ("donnner deux entier pour realiser la sequence : \n"); + scanf("%d", &x); + scanf("%d", &y); + + + if(x > y){ + difference = x - y; + for (i = 0 ; i 50000){ + n--; + printf("entrez un nombre en 1000 et 50000 il vous reste : "); + printf("%d", n); + printf(" chance\n"); + }else{ + for(epargne = 0; epargne < 7; epargne++){ + entrer *= 1.07; + annee++; + printf("votre epargne sera de "); + printf("%d", entrer); + printf(" dans "); + printf("%d", annee); + printf("ans\n"); + } + return EXIT_SUCCESS; + } + } +} \ No newline at end of file