Exforsys
+ Reply to Thread
Results 1 to 2 of 2

Greatest number

This is a discussion on Greatest number within the Oracle JDeveloper forums, part of the Programming Talk category; I have need program in PL/SQL that take 3 inputs and tell us greatest number....

  1. #1
    aafubaafu is offline Junior Member Array
    Join Date
    Feb 2010
    Answers
    1

    Greatest number

    I have need program in PL/SQL that take 3 inputs and tell us greatest number.


  2. #2
    amaanlovefiza is offline Junior Member Array
    Join Date
    Oct 2010
    Answers
    1
    CREATE OR REPLACE PROCEDURE max_3(n_1 IN NUMBER,n_2 IN NUMBER,n_3 IN NUMBER,result OUT NUMBER)
    AS
    BEGIN
    IF (n_1 >n_2) AND (n_1>n_3) THEN
    result:=n_1;
    ElSIF n_2>n_3 THEN
    result:=n_2;
    ELSE
    result:=n_3;
    END IF;
    END;

    DECLARE
    RESULT NUMBER;
    BEGIN
    MAX_3(23,45,34,RESULT);
    DBMS_OUTPUT.PUT_LINE(RESULT);
    END;


Latest Article

Network Security Risk Assessment and Measurement

Read More...