Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
please any help appreciated
I have an assignment to do in matlab:Write a Matlab program tha accepts a numerical value x fro 0 to 100 as input and computes and displays the corresponding letter grade given by the following table:
Letter Grade Marks
A x greater than or equal to 90
B x greater than or equal to 80 and x less than or equal to 89
C x greater than or equal to 70 and x less than or equal to 79
D x greater than or equal to 60 and x less than or equal to 69
F x less 60
Im not that experianced and so cant see what Ive done wrong but keep getting an error saying error==> line 8, which is the val=x line.
Does anyone see what I've done wrong.
This is my code:
%This function accepts a numerical value, x, from 0 to 100
%and computes and displays the corresponding letter grade
%Enter the number as an input argument and a grade from A to F will be
%displayed which corresponds to the number entered.