DECLARE
N1 NUMBER:='&FIRSTNO.';
N2 NUMBER:='&SECONDNO.';
OP CHAR(1):='&OPERATOR';
X NUMBER(3);
BEGIN
IF OP = '+' THEN
X := N1 + N2;
ELSIF OP = '-' THEN
X:= N1 - N2;
ELSIF OP = '*' THEN
X:= N1 * N2;
ELSIF OP = '/' THEN
X:= N1 / N2;
END IF;
DBMS_OUTPUT.PUT_LINE('THE OUPUT FOR YOUR OPERATION ' || OP || ' WITH ' || N1 || ' FIRST NUMBER & ' || N2 || ' AS SECOND NUMBER IS = ' || X);
END;
Tuesday, March 24, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment