Algorithm
Algorithm
Algorithm
Step 1: Start
Step 2: Input the scores of three courses: CM, DS, CPP
Step 3: Sum of those three courses: CM + DS + CPP
Step 4: The average of the above courses is: Sum / 3
Step 4: Compare: : The average of the above courses:
If CM > Average then counter++
If DS > Average the counter++
If C++ > Average the counter++
Step 5: Display the result of Average and counter
Step 6: Stop
II. Data Structure
The score of CM, DS, CPP
SUM
Average
Counter
CM=70
DS=50
CPP =10
Sum= 130
Average=43.33
Counter=2
III. Pseudocode
Begin
Input Cm,DS,CPP
Compute: Sum=CM+DS+CPP
Compute: Average: Sum/3
Compare
If CM>Average then counter++
IF DS>Average then counter++
If CPP> Average then counter++
Display: Average, counter
IV. Flowchart
ការតំណាងងអោយ control structure ដោយប្រើប្រាស់ flowchart
Start