ajout exemples de code cm2
This commit is contained in:
1 parent
97cb94f568
commit
e0cf06fbe7
5 files changed
+52
-6
No files matched your search
@@ -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