1. Integer P, q, r
2. Set p = 4, q = 3, r = 10
for(each r from 4 to 7)
q = (12 + 5) + P
if((q+r) < (r-q) OR r<q)
O
End if
Print p + q
Answers
Answered by
0
Answer:
eat potty, it is salty, but tasty.
Answered by
0
Answer:
25.
Explanation:
int p, q, r;
p =4,q = 3,r = 10;
for(r = 4; r<=7; r++){
q = 12 + 5 + p;
if((q + r) < (r - q) || (r < q)){
------
}
printf("%d", p+q);
In 1st step, we initialize integer p, q and r. Then we assign values to them i.e. p = 4, q = 3 and r = 10. Next, using for loop we iterate for each value of r from 4 to 7 and assign q = 17 + p i.e. q becomes 17 + 4 = 21. Then using if we check if (q + r) is less than (r - q) or r < q. In the end we print the value of p + q which becomes 4 + 21 = 25.
Hence the output is 25.
#SPJ3
To view more questions like this, visit:
https://brainly.in/question/30836906
https://brainly.in/question/33150128?msp_srt_exp=4
Similar questions
History,
1 month ago
Math,
1 month ago
Hindi,
3 months ago
Physics,
3 months ago
Political Science,
10 months ago