Beruflich Dokumente
Kultur Dokumente
Technology
BIC10204:
Algoritma dan Pengaturcaraan/
Algorithm and Programming
STUDENT’S
AHMAD KHAIRI HAFIZ BIN KHAIRUL HISHAM
NAME
MATRIC NO. CI180004
SECTION SECTION 8
1. Identify what are the input, process and output.
c. Calculate the volume of a cone, if the volume is below 12cm3, print “Accepted” but if
the volume is equal or more than 12cm3, print “Not Accepted”.
b. A student marking system receives input of student’s total mark from lecturer. If a
student gets total mark of 75 or above, the system will print ‘A’. If a student’s mark is
between 65 to 74, the system will print out ‘B’. While ‘C’ will be printed out if the mark
is between 50 to 64. Whichever the total mark is below 50, ‘F’ will be printed.
a. ABC bank offers 5% discount if payment is made within 10 days after notice. No
discount if the payment is made after 10 days.
1
A.
Input Process Output
PQRS AnswerMean = (P+Q+R+S) AnswerMean
/4
B.
C.
Start
Total=+Item[x];
If
Total>=100
&& Total
Payment=Total*0.1;
<500 Yes
No
If Total>=
500
Payment=Total*0.5
Yes
No
Display Payment
End
Start
If
Mark>= Display A
75 Yes
No
If
Mark>=&&
Display B
65 Mark
<=74 Yes
No
A
A
If
Mark>=&&
64 Mark
Display C
<=50 Yes
No
If Mark Display F
<=49
Yes
No
End
3.
a.
START
If Language is equal to 1
Set language as BM
If Language is equal to 2
Set language as BI
If Language is equal to 3
Set language as CN
Total =pay-(dept*0.05)
Total = pay-dept
Print Total
END
START
b
Total1=+numb
Total2=+numb
Total3=+numb
Total4=+numb
Total5=+numb
Total6=+numb
Total7=+numb
Total8=+numb
Total9=+numb
Total10=+numb
Total11=+numb
Total12=+numb
Print Total1
Print Total2
Print Total3
Print Total4
Print Total5
Print Total6
Print Total7
Print Total8
Print Total9
Print Total10
Print Total11
Print Total12
End