From e7e36c8bcb99362967ae398b6c2e44894c94dca2 Mon Sep 17 00:00:00 2001 From: Jose-maria FULLANA Date: Wed, 6 Oct 2021 20:30:54 +0200 Subject: [PATCH] =?UTF-8?q?Transf=C3=A9rer=20les=20fichiers=20vers=20'TP2'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- TP2/exo3.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 TP2/exo3.c diff --git a/TP2/exo3.c b/TP2/exo3.c new file mode 100644 index 0000000..bf3fa16 --- /dev/null +++ b/TP2/exo3.c @@ -0,0 +1,17 @@ +#include +int main () { + float a, b, somme ; + + printf("Entrer le premier reel\n") ; + scanf("%f",&a) ; + printf("Entrer le second reel\n") ; + scanf("%f",&b) ; + + somme = a + b; + printf("a + b = %f\n", somme) ; + + printf("%f \n", a/b); + + if (somme < 0) printf("Somme < 0\n"); + else printf("Somme >= 0\n") ; +}