DEV/DEV1.1/condition.c

68 lines
1.1 KiB
C
Raw Normal View History

2024-09-17 13:49:35 +02:00
# include <stdio.h>
# include <stdlib.h>
/*int main(void) {
int x=3;
if (x=2) {
printf("x vaut 2\n");
} else {
printf("x est different de 2\n");
}
printf("%d\n", x);
if (x=0) {
printf("x vaut 0\n");
} else {
printf("x est different de 0\n");
}
printf("%d\n", x);
return EXIT_SUCCESS;
}*/
2024-09-17 17:22:13 +02:00
/*int main(void){
2024-09-17 13:49:35 +02:00
int num = 0;
double x = 0;
int table = 0;
printf("Entrez un réel : ");
2024-09-17 17:22:13 +02:00
scanf("%lf", &x);
2024-09-17 13:49:35 +02:00
num = x ;
table = num % 3;
if ( table == 2){
num = num + 1;
printf("%d \n", num);
}else if(table == 0){
printf("%d \n", num);
}else{
num = num - 1;
printf("%d \n", num);
}
2024-09-17 17:22:13 +02:00
}*/
int main(void){
double x;
double y;
double z;
int un = x;
int deux = y;
int trois = z;
printf("entrer 3 reels : \n");
scanf("%lf",&x);
scanf("%lf",&y);
scanf("%lf",&z);
if ( y > x ){
un = y
deux = x
}else ( z)
2024-09-17 13:49:35 +02:00
}