0
Why is the inserted code giving output as 64 but when i give cout<< pro(4); it gives 16 as output?
6 Answers
+ 4
pro(n) -> n*n
So pro(4) -> 4*4
And 64/pro(4) -> 64/4*4
+ 3
HonFu Thanks for the help. I understood where i was making the mistake
+ 3
It's just search&replace.
It is our logic, that messes things up in this case. ;)
+ 1
Just put n*n betwin prentheses
# define pro(n) (n*n)
+ 1
Rafik Abdelhak Nadir Thanks. It worked.đđ
+ 1
Shatanik Mahanty U r welcome.