to define a function that returns difference of the highest number and the lowest number of any ten numbers input by the user in the main module? Reply

  1. DECLARE FUNCTION highest (n())
    DECLARE FUNCTION lowest (n())
    CLS
    DIM n(10)
    FOR i = 1 TO 10
    INPUT "enter the numbers"; n(i)
    NEXT i
    h = highest(n())
    l = lowest(n())
    PRINT "the difference between highest and lowest number"; h - l
    END

    FUNCTION highest (n())

    g = n(1)
    FOR i = 2 TO 10
    IF n(i) > g THEN g = n(i)
    NEXT i
    highest = g
    END FUNCTION

    FUNCTION lowest (n())

    s = n(1)
    FOR i = 2 TO 10
    IF n(i) < s THEN s = n(i)
    NEXT i
    lowest = s

    END FUNCTION

Comments

its not working, when we input numbers it only takes one value . according to the question two values are required
its not working, when we input numbers it only takes one value . according to the question two values are required
Blogger said…
Look at the way my partner Wesley Virgin's story starts in this SHOCKING AND CONTROVERSIAL VIDEO.

You see, Wesley was in the military-and shortly after leaving-he revealed hidden, "self mind control" tactics that the government and others used to obtain anything they want.

These are the same methods lots of celebrities (notably those who "come out of nowhere") and the greatest business people used to become rich and successful.

You've heard that you use less than 10% of your brain.

Mostly, that's because the majority of your brain's power is UNCONSCIOUS.

Maybe this thought has even occurred INSIDE your own head... as it did in my good friend Wesley Virgin's head around 7 years ago, while driving a non-registered, beat-up garbage bucket of a vehicle without a driver's license and with $3 in his pocket.

"I'm absolutely fed up with living check to check! When will I become successful?"

You've been a part of those those types of thoughts, ain't it so?

Your success story is waiting to start. All you need is to believe in YOURSELF.

CLICK HERE TO LEARN WESLEY'S METHOD

Popular posts from this blog

PROGRAM TO FIND SQUARE, CUBE, SQUARE ROOT AND CUBE ROOT OF GIVEN NUMBER

PROGRAM TO DISPLAY SUM, PRODUCT, DIFFERENCE AND PRODUCT OF TWO / THREE NUMBERS

PALINDROME AND ARMSTRONG PROGRAMS