According to the question, we have to read an unknown number of pairs of inputs (prime, exponent)...
By which I mean, I cannot determine the total number of inputs before hand...
I have to use "getchar()" to read the whole line, until a '\n' is discovered...
I want to ask
1) Is there any present function that allows me to read the inputs correctly, instead of writing the part for input by "getchar()"?
2) What does it mean by FLOATING POINT EXCEPTION? Where does it come from my piece of code?
THX
Here is my code
Code: Select all
OK-ed