I have a written a program to calculate the average marks of students:
DECLARE 
    rno   NUMBER(10); 
    wt    NUMBER(10); 
    dbms  NUMBER(10); 
    se    NUMBER(10); 
    toc   NUMBER(10); 
    per   FLOAT(10); 
    total NUMBER(10); 
BEGIN 
    rno := &rno; 
    wt := &wt; 
    dbms := &dbms; 
    se := &se; 
    toc := &toc; 
    IF( wt < 40 OR se < 40 OR toc < 40 OR dbms < 40 ) THEN 
        dbms_output.Put_line('Fail'); 
        total := ( wt + se + toc + dbms ); 
        per := ( total / 400 ) * 100; 
        IF( per > 75 ) THEN 
            dbms_output.Put_line('grade A'); 
        ELSIF( per > 65 AND per < 75 ) THEN 
            dbms_output.Put_line('grade B'); 
        ELSIF( per > 40 AND per < 65 ) THEN 
            dbms_output.Put_line('grade c'); 
        ELSE 
            dbms_output.Put_line('Invalid Input'); 
        END IF; 
        dbms_output.Put_line('percentage is' ||per); 
    END IF; 
END; 
/ 
There is no error in the program. But The output of the program is as follows:
Enter value for rno: 1
old  10:  rno:=&rno;
new  10:  rno:=1;
Enter value for wt: 23
old  11:  wt:=&wt;
new  11:  wt:=23;
Enter value for dbms: 56
old  12:  dbms:=&dbms;
new  12:  dbms:=56;
Enter value for se: 74
old  13:  se:=&se;
new  13:  se:=74;
Enter value for toc: 84
old  14:  toc:=&toc;
new  14:  toc:=84;
PL/SQL procedure successfully completed.
SQL> /
Enter value for rno: 2
old  10:  rno:=&rno;
new  10:  rno:=2;
Enter value for wt: 45
old  11:  wt:=&wt;
new  11:  wt:=45;
Enter value for dbms: 25
old  12:  dbms:=&dbms;
new  12:  dbms:=25;
Enter value for se: 73
old  13:  se:=&se;
new  13:  se:=73;
Enter value for toc: 22
old  14:  toc:=&toc;
new  14:  toc:=22;
PL/SQL procedure successfully completed.
The program does not reach the 'if' statement and further. Please help.
 
     
     
    