Transférer les fichiers vers 'TP2'

This commit is contained in:
Jose-maria FULLANA 2021-10-06 20:30:54 +02:00
parent ec82c21075
commit e7e36c8bcb
1 changed files with 17 additions and 0 deletions

17
TP2/exo3.c Normal file
View File

@ -0,0 +1,17 @@
#include <stdio.h>
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") ;
}