Ajout des fichiers des seances precedentes
This commit is contained in:
parent
c3af44830f
commit
701e40bdaa
16
DEV1.1/TP01/arithmetique.c
Normal file
16
DEV1.1/TP01/arithmetique.c
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
int main(void) {
|
||||||
|
printf("%d\n", 100/6);
|
||||||
|
printf("%d\n", 100%6);
|
||||||
|
printf("%d\n", 0x1A*015);
|
||||||
|
printf("%d\n", -3/5);
|
||||||
|
printf("%d\n", -31/5);
|
||||||
|
printf("%d\n", -31%5);
|
||||||
|
printf("%d\n", 100*(3/5));
|
||||||
|
printf("%d\n", 100*3/5);
|
||||||
|
printf("%d\n", 2-3-5);
|
||||||
|
printf("%d\n", 2-(3-5));
|
||||||
|
return EXIT_SUCCESS;
|
||||||
|
}
|
9
DEV1.1/TP01/bases.c
Normal file
9
DEV1.1/TP01/bases.c
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
int main(void) {
|
||||||
|
printf("%d\n", 72);
|
||||||
|
printf("%d\n", 0110);
|
||||||
|
printf("%d\n", 0x48);
|
||||||
|
return EXIT_SUCCESS;
|
||||||
|
}
|
40
DEV1.1/TP01/bitbybit.c
Normal file
40
DEV1.1/TP01/bitbybit.c
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
int main(void) {
|
||||||
|
int n = 1431655765;
|
||||||
|
printf("%d", (n>>31)&1);
|
||||||
|
printf("%d", (n>>30)&1);
|
||||||
|
printf("%d", (n>>29)&1);
|
||||||
|
printf("%d", (n>>28)&1);
|
||||||
|
printf("%d", (n>>27)&1);
|
||||||
|
printf("%d", (n>>26)&1);
|
||||||
|
printf("%d", (n>>25)&1);
|
||||||
|
printf("%d", (n>>24)&1);
|
||||||
|
printf("%d", (n>>23)&1);
|
||||||
|
printf("%d", (n>>22)&1);
|
||||||
|
printf("%d", (n>>21)&1);
|
||||||
|
printf("%d", (n>>20)&1);
|
||||||
|
printf("%d", (n>>19)&1);
|
||||||
|
printf("%d", (n>>18)&1);
|
||||||
|
printf("%d", (n>>17)&1);
|
||||||
|
printf("%d", (n>>16)&1);
|
||||||
|
printf("%d", (n>>15)&1);
|
||||||
|
printf("%d", (n>>14)&1);
|
||||||
|
printf("%d", (n>>13)&1);
|
||||||
|
printf("%d", (n>>12)&1);
|
||||||
|
printf("%d", (n>>11)&1);
|
||||||
|
printf("%d", (n>>10)&1);
|
||||||
|
printf("%d", (n>>9)&1);
|
||||||
|
printf("%d", (n>>8)&1);
|
||||||
|
printf("%d", (n>>7)&1);
|
||||||
|
printf("%d", (n>>6)&1);
|
||||||
|
printf("%d", (n>>5)&1);
|
||||||
|
printf("%d", (n>>4)&1);
|
||||||
|
printf("%d", (n>>3)&1);
|
||||||
|
printf("%d", (n>>2)&1);
|
||||||
|
printf("%d", (n>>1)&1);
|
||||||
|
printf("%d", n&1);
|
||||||
|
printf("\n");
|
||||||
|
return EXIT_SUCCESS;
|
||||||
|
}
|
721
DEV1.1/TP01/intermediaire.i
Normal file
721
DEV1.1/TP01/intermediaire.i
Normal file
File diff suppressed because it is too large
Load Diff
11
DEV1.1/TP01/limite.c
Normal file
11
DEV1.1/TP01/limite.c
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
int main(void) {
|
||||||
|
|
||||||
|
int x = 4294967295;
|
||||||
|
printf("%d\n",x);
|
||||||
|
printf("%o\n",x);
|
||||||
|
printf("%x\n",x);
|
||||||
|
return EXIT_SUCCESS;
|
||||||
|
}
|
9
DEV1.1/TP01/multi.c
Normal file
9
DEV1.1/TP01/multi.c
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
int main(void) {
|
||||||
|
|
||||||
|
printf("%dx%d=%d\n",73,16,73<<4);
|
||||||
|
|
||||||
|
return EXIT_SUCCESS;
|
||||||
|
}
|
7
DEV1.1/TP01/salut.c
Normal file
7
DEV1.1/TP01/salut.c
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
printf("Hello World ! \n");
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user