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
Comments
Leave a comment