Answer to Question #256683 in Algorithms for Dion Martins

Question #256683

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


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. Use a simple for-loop to determine the answer.


1
Expert's answer
2021-10-28T06:08:20-0400


Algorithm:


Start
   Declare varaible integer studName= ""
   Declare array integer marks[3] 
   Declare varaible integer examMark
   Declare varaible integer finMark
   Declare varaible integer agv
   for i = 1 to 100 step 1 do
       Read studName
       for j=0 to 3 step 1 do
             Read marks[i]
       end for
       Declare varaible integer sum=0
       for j=0 to 3 step 1 do
	     sum=sum+marks[i]
       end for
    end for
    Set agv=sum/3
    Set finMark=agv*0.5+examMark*0.5
    Display finMark
Stop





IPO



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