Find output of the given program segment: int a=10,r=0; double t= 0.0; if(a%5 ==0) { t=Math.pow(a,2); System.out.println(t); } else { r=4*a-7; System.out.println(r); }
Answers
Answered by
1
Answer:
Since,(a%5==0) is true
So,Math.pow(a,2) will be executed.
t=10*10
t=100
Similar questions