hi folks.
i ve got a lab questions stating: write pseudocode for a program which allows the user to input two numbers (x and Y0 and a code c . if the code has value 1, the program should ouput the larger of X and y and otherwise the smaller.

My version of pseudo code is ;
step:
1- get the value of A and B
2- get the value of C
3- if (value of code= 1)
do
compare if x>y
print x
else print y
end.

plz correct any errors within this pseudo code.

1) Get values of X, Y, and C and assign them to respective variables
2) If C = 1 then
If X > Y then print X else Print Y
3) If C Is Not = 1 then
If X < Y then Print X else Print Y
4) End

aprreciate your help

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.