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