From 474e609763e292af181a4f975d24c941252e1239 Mon Sep 17 00:00:00 2001 From: Jose-maria FULLANA Date: Wed, 6 Oct 2021 20:33:02 +0200 Subject: [PATCH] =?UTF-8?q?Transf=C3=A9rer=20les=20fichiers=20vers=20'TP3'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- TP3/dowhile.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 TP3/dowhile.c diff --git a/TP3/dowhile.c b/TP3/dowhile.c new file mode 100644 index 0000000..a90ff9c --- /dev/null +++ b/TP3/dowhile.c @@ -0,0 +1,20 @@ +#include + +int main () { + int a = 5; + + int i = 6; + /********************************/ + /* avec une variable auxiliaire */ + /********************************/ + do { + printf("%d \n",i); + i = i + 1 ; + } while (i<= a) ; + /********************************/ + /* valeur à la fin */ + /********************************/ + printf("a la fin i vaut %d \n",i); + return 1; +} +