You are viewing a single comment's thread. Return to all comments →
pow() gives a double value,but you are using an integer so the precision is lost..Type cast the pow() function to integer .
You will get it done.
In case you haven't noticed, first you need to take all the inputs and then output according to each of them. Not, give the output after every, input.