Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int isGood(const char *filename) {
- FILE *f = fopen(filename, "r");
- if( !f )
- return 0;
- int c;
- while( (c = fgetc(f)) != EOF ) {
- if( c == '\n' || c == '\r' )
- continue;
- if( c <= '0' || c >= '9' )
- return 0;
- }
- fclose(f);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement