Answer to Question #270168 in Databases | SQL | Oracle | MS Access for Tarurendra Kushwah

Question #270168

Create a package which contains function to ask the user to enter the student’s marks and determine the GRADE according to the following criteria.

>90 A

>80AND <90 B

>70AND <80 C

>60 AND<70 D

<60 F

1
Expert's answer
2021-11-25T07:04:49-0500
create or replace package body marks_stu AS
function grade_info(score in number, grade out char) return char as
BEGIN 
IF score>90 THEN
grade := 'A';


ELSIF score>80 and score<90 THEN
grade := 'B' ;


ELSIF score>70 and score<80 THEN
grade := 'C' ;


ELSIF score>60 and score<70 THEN
grade := 'D' ;


ELSIF score<60 THEN
grade := 'F';
END IF;

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