Created
February 10, 2015 20:53
-
-
Save arkokoley/c0c8c30add42519bc5cd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
int main(int argc, char*argv[]){ | |
FILE *file = fopen(argv[1],"r"); | |
int a,b,c,N[1000],i; | |
fscanf(file,"%d\n%d\n%d\n",&a,&b,&c); | |
printf("%d %d %d\n",a,b,c); | |
for(i=0;!feof(file);++i){ | |
N[i] = fgetc(file) - '0'; | |
if(feof(file)) | |
break; | |
} | |
a = i-1; | |
for(i=0;i<a;++i) | |
printf("%d",N[i]); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment