Question

Q3. Write a MATLAB program that prompt the user to enter number of studentsN) Then, gave each students their grades(G1, G2,.G
0 0
Add a comment Improve this question Transcribed image text
Answer #1

clc;

clear all;

N=input('Enter the number of students');

G=input('Enter the grades of student')

AV=sum(G)/N;

M=max(G);

[max_num,R] = max(G(:));

fprintf('\nAverage of student grade=%d',AV)

fprintf('\nMaximum grade is =%d',M)

fprintf('\nRank of maximum grade=%d',R)

OUTPUT----------------------------------

Enter the number of students> 6
Enter the grades of student> [5 50 60 70 80 90]
G =

    5   50   60   70   80   90


Average of student grade=59.1667
Maximum grade is =90
Rank of maximum grade=6
Add a comment
Know the answer?
Add Answer to:
Q3. Write a MATLAB program that prompt the user to enter number of studentsN) Then, gave each stu...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT