Skip to content

Instantly share code, notes, and snippets.

@MaratB
Created October 16, 2013 21:32
Show Gist options
  • Save MaratB/7015249 to your computer and use it in GitHub Desktop.
Save MaratB/7015249 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <string.h>
#include <conio.h>
main(){
char s[80];
FILE *fp;
int x,y;
fp = fopen("input.txt", "r");
while (fgets(s,80,fp))
if (s[0]=='#'){
sscanf(s+1,"%d%d", &x, &y);
break;
}
fclose(fp);
printf( "x = %d, y = %d", x, y );
getch();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment