Ajout des travaux effectuer

This commit is contained in:
2024-12-09 11:53:11 +01:00
parent 05fac8d3ae
commit c4e97e13da
558 changed files with 67900 additions and 0 deletions

Binary file not shown.

View File

@@ -0,0 +1,26 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(int argc, char const *argv[])
{
int time = 0;
FILE* f;
f=fopen("compteur","r");
if(f == NULL){
f=fopen("compteur","w");
fwrite(&time,1,4,f);
time = 1;
printf("Nombres de fois ouvert : inexistant\n");
fclose(f);
}
else{
fread(&time,1,4,f);
f=fopen("compteur","w");
time++;
fwrite(&time,1,4,f);
printf("Nombres de fois ouvert : %d\n", time);
fclose(f);
}
return 0;
}

View File

@@ -0,0 +1,27 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(int argc, char const *argv[])
{
FILE* f;
int i;
int n = 0;
int y;
char c[100];
f=fopen(argv[1],"r");
while(feof(f)==1){
for(i=0;i<y;i++){
if( c[i] ='\n'){
printf("\n");
n=n+10;
}else{
printf("%07d ",n);
fread(&c,3,1,f);
printf("%c ", c[i]);
}
}
}
fclose(f);
return 0;
}

View File

@@ -0,0 +1,37 @@
#include <stdio.h>
#include <stdlib.h>
#include <graph.h>
int main(int argc, char const *argv[])
{
FILE* f;
f = fopen("image.bin","r");
int i, j;
int largeur, hauteur;
couleur c;
fread(&largeur,4,1,f);
fread(&hauteur,4,1,f);
printf("%d\n",largeur);
printf("%d\n",hauteur);
InitialiserGraphique();
CreerFenetre(10, 10, largeur, hauteur);
fseek(f,8*largeur/2*hauteur,SEEK_CUR);
for(i=largeur/2;i<largeur;i++){
fseek(f,8*hauteur/2,SEEK_CUR);
for(j=hauteur/2;j<hauteur;j++){
fread(&c,sizeof(unsigned long),1,f);
ChoisirCouleurDessin(c);
DessinerPixel(i, j);
}
}
Touche();
FermerGraphique();
fclose(f);
return 0;
}

Binary file not shown.

Binary file not shown.

Binary file not shown.