debut pile
This commit is contained in:
27
DEV1.1/TP21/hexadecimal.c
Normal file
27
DEV1.1/TP21/hexadecimal.c
Normal 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 EXIT_SUCCESS;
|
||||
}
|
||||
Reference in New Issue
Block a user