ajout exemples de code cm2
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
}
|
||||
@@ -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);
|
||||
|
||||
|
||||
}
|
||||
@@ -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);
|
||||
|
||||
}
|
||||
@@ -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);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user