Do the necessary planning (IPO) and write an algorithm in pseudo code for the following:
Display the final mark for every student.
1.1 Use a nested for loop to determine the answer.
Input: name as string, marks[3] as integer, exam as integer
Process: sum of marks, average mark and final mark
Output: print name and final mark
1. For i from 1 to 100 do
2. Read name as string
3. Set sum equal 0
4. For j from 1 to 3
5. Read mark
6. Add mark to sum
7. Next j
8. Set agv = sum / 3
9. Read exam as integer
10. Set final equal 0.5*agv + 0.5*exam
11. Print name, final
12. Next i
Comments
Leave a comment