Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Consider the following pseudocode: int a : = the 5 th digit of your Student ID ; int b : = the 6 th digit
Consider the following pseudocode:
int a : the th digit of your Student ID ;
int b : the th digit of your Student ID ;
int c : the th digit of your Student ID ;
int d : the th digit of your Student ID ;
int z; global variable
procedure fint x
if a b and c d then z : a d;
elseif a b and c d then x : d c;
elseif a b and c d then x : c a;
else z : d a;
endif;
insert code
The main execution starts here.
z : a;
fz;
printz;
Insert your own code where indicated above. Your code cannot modify the values of a b
c and d Your code must simultaneously make the execution of the program:
a print a number that is greater or equal than a with printz above, if executed
using call by reference.
b print a number that is smaller or equal than b with printz above, if executed using
call by valueresult.
Remember: Do not provide two code solutions one for a and one for b You will have
to provide the same code that simultaneously satisfies a and b
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started