ajout exemples de code cm2

This commit is contained in:
Francois Lesueur
2022-09-06 10:17:24 +02:00
parent 97cb94f568
commit e0cf06fbe7
5 changed files with 52 additions and 6 deletions
+12
View File
@@ -0,0 +1,12 @@
#include <stdio.h>
void main()
{
unsigned char a = 155;
unsigned char b = 155;
unsigned char c = a + b;
printf("Value of c is: %d\n",c);
}
+12
View File
@@ -0,0 +1,12 @@
#include <stdio.h>
void main()
{
char a = 127;
char b = 1;
char c = a + b;
printf("Value of c is: %d\n",c);
}
+11
View File
@@ -0,0 +1,11 @@
#include <stdio.h>
void main()
{
double a = 0.1;
double b = 0.2;
double c = a + b;
printf("Value of c is: %.20f\n",c);
}
+11
View File
@@ -0,0 +1,11 @@
#include <stdio.h>
void main()
{
int a = 0.1;
int b = 0.2;
int c = a + b;
printf("Value of c is: %d\n",c);
}