0% found this document useful (0 votes)
12 views

Algorithm

Uploaded by

boriboboem
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Algorithm

Uploaded by

boriboboem
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 13

I.

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

1. Flowchart តំណាំងអោយ if statement


2. Flow chart តំណាំងអោយ if else:

3. Flowchart តំណាងអោយ if else និងelse if

4. Flow chart តំណាងអោយ Nested if statement.


5. Flow chart

តំណាងអោយ for loop


6. Flowchart តំណាងអោយ while loop statement

7. Flowchart តំណាងអោយ do while loop


8. Flowchart តំណាងអោយ Nested for loop
Flowchart តំណាងអោយ Nested while-loop

Flowchart តំណាងអោយ Nested do-while-loop


Exercise

Start

You might also like