R1.03/cm2-nombres-code/floatdouble.c

16 lines
231 B
C
Raw Permalink Normal View History

2022-09-13 08:45:13 +02:00
#include <stdlib.h>
#include <stdio.h>
int main()
{
float a = 0.1;
float b = 0.2;
float c = 0.3;
/* double a = 0.1;
double b = 0.2;
double c = 0.3; */
if (a+b == c) {printf("égaux\n");} else {printf("différents\n");}
}