Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- int main()
- {
- FILE *f;
- char ch[10];
- scanf("%s",ch);
- f=fopen(strcat(ch,".txt"),"r");
- int i=1;
- char buf[200];
- while(fgets(buf,200,f)){
- printf("Ligne %d\t\n",i);
- printf("%s",buf);
- i++;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment