ผังงาน
psudo code
start
set score=0.00,grade=0
input score
if score>=0 and score<50 then
grade=0
else if score>=50 and score<60 then
grade=1
else if score>=60 and score<70 then
grade=2
else if score>=70 and score<80 then
grade=3
else if score>=80 and score<=100 then
grade=4
endif
print grade
stop
ตัวอย่างการโปรแกรม
score=0
grade=0
score=float(input("input score:"))
if score=>0 and score<50:
grade=0
elif score>=50 and score<60:
grade=1
elif score>=60 and score<70:
grade=2
elif score>=70 and score<80:
grade=3
elif score>=80 and score<=100:
grade=4
print(grade)