how to make a BufferedReader in C
- by peiska
I am really new programming in C. How can i do the same in C, maybe in a more simple way then the one a do in Java.
Each line of the input have to Integers: X e Y separated by a space.
12 1
12 3
23 4
9 3
InputStreamReader in = new InputStreamReader(System.in);
BufferedReader buf = new BufferedReader(in);
int n;
int k;
double sol;
String line ="";
line=buf.readLine();
while( line != null && !line.equals("")){
String data [] = line.split(" ");
n = Integer.parseInt(data[0]);
k = Integer.parseInt(data[1]);
calculus (n,k);
line = buf.readLine();
}