1. Write an pseudo code and flowchart.
A. Receive 3 numbers and display them in. ascending order from smallest to largest.
B. Add the even numbers between 0 and any positive integers number given by the user.
C. Read 10 integers from the keyboard in the range 0-100, and count how many of them are larger than 50, and display this result.
D. Take an integer from the user and display the factorial of the number.
# task A
input A,B,C
X = get min element in set{A,B,C}
Z = get maximum element in set {A,B.C}
Y = of set{A,B,C} substract set {X,Y}
output X,Y,Z
# task B
input N
sum = 0
i = 0
while i< N
begin
sum := sum +i
i := i+2
end
output sum
# task C
input array a[10]
each element in arrray 0<a[n]<100
count = 0
for each each element in arrray a
begin
if element >50 then count := count+1
end
output count
#task D
input n
result = 1
for i := 1 to n
begin
result:= result*i
end
output result
Comments
Thank you Very much. My rate this website ☆☆☆☆☆
Leave a comment