Answer to Question #256684 in Algorithms for Dion Martins

Question #256684

Do the necessary planning (IPO) and write an algorithm in pseudo code for the following:


  1. Write an algorithm that will accept the following for 100 students: The students’ name (studName) and 3 test marks (marks), as well as one exam mark (examMark). The program must calculate the final mark (finMark) for every student. The final mark comprises of 50% of the exam mark added to 50% of the average (agv) of the 3 tests.

Display the final mark for every student.


1.1 Use a nested for loop to determine the answer.


1
Expert's answer
2021-10-29T02:34:33-0400

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

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS