Answer to Question #221517 in Algorithms for Aqeel

Question #221517
Q2:-1 List containing grades the first class students of Civil Engineering Department. (n students) in the three subjects. A: Draw the flowchart to calculate the average marks after reading the name for each student B: Write Matlab code to calculate the average marks after reading the name for each student
1
Expert's answer
2021-07-29T23:33:31-0400
 Matlab code:


numberStudents = input('Enter the number of students:');
for student = 1:numberStudents 
    sum=0;
    name=input('Enter the name of student:');
    for mark = 1:3 
        mark = input('Enter the mark of subject for student: ');
        sum+=mark;
    end
    fprintf('The average marks: %.2f\n', (sum/3.0)); 
end


the flowchart






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