ll a=2,b=3,x=5;
ll n=a^x+b^x;
cout<<n<<" ";
ll m=a^x;n=b^x;
cout<<n+m;
why it outputs different output both time even I’am doing same thing.
someone plzz help
ll a=2,b=3,x=5;
ll n=a^x+b^x;
cout<<n<<" ";
ll m=a^x;n=b^x;
cout<<n+m;
why it outputs different output both time even I’am doing same thing.
someone plzz help
Operator precedence.
due to precedence is expression is evaluated as : (a)^(x+b)^(b). so the ans is 15:
use. this ll n=(a^x)+(b^x);
ohh i got it now thanks all of you