int p = 200; int q = 100; if(p%2==0){ q = q/50; } else{ q = q/100; } q = ?  What will be the final value of q after execution

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter5: Repetition Statements
Section: Chapter Questions
Problem 7PP
icon
Related questions
Question

int p = 200;
int q = 100;

if(p%2==0){
q = q/50;
}
else{
q = q/100;
}

q = ? 

What will be the final value of q after execution. In C++

Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr