Assignment Solution
Assignment Solution
Assignment Solution
Assignment
start
declare intager i, j, m.
i=3 ,
j=2.
m=++i + j++
print m.
End.
The output is
6
The output is
1020
Suppose price is 6001, what is the output of the following pseudocode segment
If (price== 6000) then
Print “price is equal to 6000”
else If (price< 6000) then
Print “price is less than 6000”
else print price
The output is
6001
Introduction to problem solving
start
declare a
declare b
input a
input b
result = a * b
if result == 1 then
print " b is the invers of a "
else
print " b is not the invers of a "
end if
End
Introduction to problem solving
start
Input M1 , M2 , M3
average grade
= (M1+ M2+M3)/ 3
if
yes no
average grade
>=60
stop
Introduction to problem solving
Start
Declare n
n=4
While (n >= 0)
Display (n*n)
--n
EndWhile
Display n
While (n < 4)
Display n++
EndWhile
Display n
End
The output is :
4 // first while
5 // second while
Introduction to problem solving
What the suitable pseudo code that corresponds to the flowchart below
a)
Step 1: Read values a and b,