This commit is contained in:
2025-09-16 22:06:16 +02:00
parent c58a81f6d6
commit 3f14e4bcbd
3 changed files with 26 additions and 1 deletions

View File

@@ -15,4 +15,4 @@ int main(void){
return EXIT_SUCCESS;
}
/*

25
DEV1.1/TP06/exo3.c Normal file
View File

@@ -0,0 +1,25 @@
#include <stdio.h>
#include <stdlib.h>
int main(void) {
int r1;
int r2;
int err1;
int err2;
printf("Saisir le premier réel :\n");
err1 = scanf("%d",&r1);
printf("Saisir le second réel :\n");
err2 = scanf("%d",&r2);
if ((r1 > -1 && r2 > -1) || (r1 <0 && r2 <0)){
/* si (R1>-1) ET (R2>-1) est vrai alors + sinon - OU (R1<0) et (R2<0) est vrai alors + sinon -.Si aucune des deux conditions est vrai alors ca renvoie */
printf("le signe du produit est +\n");
} else {
printf("le signe du produit est -\n");
}
return EXIT_SUCCESS;
}

0
DEV1.1/TP06/exo4.c Normal file
View File