+ 1
int main() { int i=4; int ii=i*i; int iii = ii*i; cout <<iii/ii-i<<endl ; //Outputs 0 return 0; }
Please explain the output.
3 Respostas
+ 2
i=4
ii=16
iii=64
cout<<64/16-4
64/16=4
4-4=0
+ 2
The division is made before (iii/ii)=x and then the result of this is substracted with i (x-i).
NOTE: The output is NOT iii/(ii-i)
Hope you understood it✌
0
since division has higher precedence than subtraction u'll get 0 as output