Joined: 22 Oct, 2007
I am little confused here. So please help me.
I am given a txt file in the following format
110001 + 123500
I need to read these numbers into the source file, do the addition and then print the result.
My approach was to use a for loop to read a character at a time until an operator such as '+' is found. Store that number into a var1, then continue reading after the operator symbol '+' until new line is approached. Store that number into var2.
Then add var1+ var2.
But what will be my parameters for for loop. I mean
for (i = 0; i <= ? ; i++);
Appreciate your help guys.