update
This commit is contained in:
10
DEV.1.1/CM1/ex1.c
Normal file
10
DEV.1.1/CM1/ex1.c
Normal file
@@ -0,0 +1,10 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main(void){
|
||||
printf(" __\n");
|
||||
printf("(___()'`;\n");
|
||||
printf("/, /`\n");
|
||||
printf("\\\\\"--\\\\\n");
|
||||
|
||||
}
|
15
DEV.1.1/CM1/ex2.c
Normal file
15
DEV.1.1/CM1/ex2.c
Normal file
@@ -0,0 +1,15 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main(void) {
|
||||
short int a = 7;
|
||||
unsigned char b = 77;
|
||||
float c = 777;
|
||||
long int d = 7777;
|
||||
|
||||
printf("%03hd\n", a);
|
||||
printf("%c\n", b);
|
||||
printf("%.0f\n", c);
|
||||
printf("%lx\n", d);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
32
DEV.1.1/CM1/ex3.c
Normal file
32
DEV.1.1/CM1/ex3.c
Normal file
@@ -0,0 +1,32 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main(void){
|
||||
int premdes, dodes;
|
||||
|
||||
printf("Entrez le premier dé : ");
|
||||
scanf("%d", &premdes);
|
||||
printf("Entrez le second dé : ");
|
||||
scanf("%d", &dodes);
|
||||
|
||||
if(premdes!=1){
|
||||
if(premdes!=6){
|
||||
if(premdes==dodes){
|
||||
printf("Hard ways\n");
|
||||
}
|
||||
}else if(premdes==6){
|
||||
if(dodes==6){
|
||||
printf("Boxcars");
|
||||
}
|
||||
}
|
||||
}else if(premdes==1){
|
||||
if(dodes==1){
|
||||
printf("snake eyes\n");
|
||||
}}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
13
DEV.1.1/CM1/ex4.c
Normal file
13
DEV.1.1/CM1/ex4.c
Normal file
@@ -0,0 +1,13 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main(void){
|
||||
int i,j;
|
||||
|
||||
for(i=1;i<=20;i++){
|
||||
for(j=1;j<=i;j++){
|
||||
printf(" %d ",(i+j)/2);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
18
DEV.1.1/CM1/ex4.html
Normal file
18
DEV.1.1/CM1/ex4.html
Normal file
@@ -0,0 +1,18 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main(void){
|
||||
int i,j;
|
||||
|
||||
for(i=1;i<=20;i++){
|
||||
for(j=1;j<=i;j++){
|
||||
printf(" %d ",(i+j)/2);
|
||||
}
|
||||
}
|
||||
|
||||
}htmlhrtmlhtmlhtmlhtmlhtmlhtmlhtmlhtmlhtmlhtmlhtmlhtmlhtmlhtmlhtmlhtmlh cssc cssc cscccs cs cscsc struct
|
||||
|
||||
|
||||
{
|
||||
|
||||
};
|
26
DEV.1.1/CM1/ex5.c
Normal file
26
DEV.1.1/CM1/ex5.c
Normal file
@@ -0,0 +1,26 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#define PORTA 5
|
||||
#define CROIS 4
|
||||
#define aCONTORP 3
|
||||
#define bCONTORP 3
|
||||
#define TORP 2
|
||||
|
||||
int main(void){
|
||||
int coord[10][10],x,y,i;
|
||||
|
||||
for(i=0;PORTA<0;PORTA){
|
||||
coord[1][i] = 1;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
while(coord[10][10]!= {0}){
|
||||
printf("Coordonées? ");
|
||||
scanf("%d %d",&x,&y);
|
||||
if(coord[]==x){
|
||||
if(y==)
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user