1. pseudocode
{
In the main function
print prompt "Input number X"
print prompt "Input number Y"
print prompt "Input Code C"
If Code == 1
If X > Y
Set largest = X
If X < Y
Set largest = Y
print the largest to the user
else
If X < Y
Set smallest = X
If X > Y
Set smallest = Y
print the smallest to the user
}
2.psedocode
{
In the main function
print prompt "Input number N"
If N%2 == 1
print 1 to the user
else
print 0 to the user
}
3.
{
In the main function
print prompt "Input number X"
print prompt "Input number Y"
set Temp = 1
set Sum = 0
while (Temp < =Y)
Sum = sum + X
Temp = Temp +1
print the Sum to the user
}
Get Answers For Free
Most questions answered within 1 hours.