Giving a=10, b=2.5, c=6; what will be the output of 1° int m= a-b*c; 2° char k= (a%2==0?'P','R'); 3°float p=5+c/a; | SoloLearn: Learn to code for FREE!

0

Giving a=10, b=2.5, c=6; what will be the output of 1° int m= a-b*c; 2° char k= (a%2==0?'P','R'); 3°float p=5+c/a;

what is the output of this?

c++

3/20/2017 4:12:41 PM

Stherdo Wss

1 Answer

New Answer

+1

1. m=a-b*c = 10 - 2.5 * 6 = 10 - 12 = -2 2. char k= (a%2==0?'P','R'); =(10%2==0?'P':'R') ='P' 3. float p=5+c/a =5+2.5/10 =5+0.25 =5.25