{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}


CamposTylerCW4 - elseif(GradeValue<60 fprintf'Your grade...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
NumG = 0; GradeSum = 0; response = 'Y'; while response=='Y'; GradeValue = input('Input Grade: '); NumG = NumG +1; while(GradeValue <0) || (GradeValue >100); fprintf('Invalid Grade\n'); end v(NumG) = GradeValue; if (GradeValue >=90); fprintf('Your grade: A\n'); elseif (GradeValue >=80); fprintf('Your grade: B\n'); elseif (GradeValue >=70); fprintf('Your grade: C\n'); elseif (GradeValue >=60); fprintf('Your grade: D\n');
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: elseif (GradeValue <60); fprintf('Your grade: F\n'); end GradeSum = GradeValue+GradeSum; G response = input('Do you wish to enter another grade? Y or N?\n', 's'); end FinalGrade = GradeSum/NumG; F A=0; for Difsum = Difsum + (Delta^2); Delta = ((v(A)-(FinalGrade))^2); fprintf('Sum of all grades is: %.0f\n',GradeSum); fprintf('Final Grade: %0.2f\n',FinalGrade);...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online