AREA OF TRIANGLE, FOUR WALLS AND PARALLELOGRAM

24. Display area of 4 walls.


REM PROGRAM TO DISPLAY AREA OF 4 WALLS
CLS
INPUT “ENTER LENGTH”; L
INPUT “ENTER BREADTH”; B
INPUT “ENTER HEIGHT”; H
A = 2 * H * (L + B)
PRINT “AREA OF FOUR WALLS“; A
END

USING SUB PROCEDURE

DECLARE SUB AREA (L, B, H)
CLS
INPUT “ENTER LENGTH”; L
INPUT “ENTER BREADTH”; B
INPUT “ENTER HEIGHT”; H
CALL AREA (L, B, H)
END

SUB AREA (L, B, H)
A = 2 * H * (L + B)
PRINT “AREA OF FOUR WALLS”; A
END SUB

USING FUNCTION PROCEDURE

DECLARE FUNCTION AREA (L, B, H)
CLS
INPUT “ENTER LENGTH”; L
INPUT “ENTER BREADTH”; B
INPUT “ENTER HEIGHT”; H
AR = AREA(L, B, H)
PRINT “AREA OF FOUR WALLS”; AR
END

FUNCTION AREA (L, B, H)
A = 2 * H * (L + B)
AREA = A
END FUNCTION


25. Display area of triangle.

REM PROGRAM TO DISPLAY AREA OF TRIANGLE
CLS
INPUT “ENTER BREADTH”; B
INPUT “ENTER HEIGHT”; H
A = 1 / 2  * (B * H)
PRINT “AREA OF TRIANGLE “; A
END

USING SUB PROCEDURE

DECLARE SUB AREA (B, H)
CLS
INPUT “ENTER BREADTH”; B
INPUT “ENTER HEIGHT”; H
CALL AREA (B, H)
END

SUB AREA (B, H)
A = 1 / 2  * (B * H)
PRINT “AREA OF TRIANGLE”; A
END SUB

USING FUNCTION PROCEDURE

DECLARE FUNCTION AREA (B, H)
CLS
INPUT “ENTER BREADTH”; B
INPUT “ENTER HEIGHT”; H
AR = AREA( B, H)
PRINT “AREA OF TRIANGLE ”; AR
END

FUNCTION AREA (B, H)
A = 1 / 2 * (B * H)
AREA = A
END FUNCTION

26. Display area of parallelogram.

REM PROGRAM TO DISPLAY AREA OF PARALLELOGRAM
CLS
INPUT “ENTER BREADTH”; B
INPUT “ENTER HEIGHT”; H
A = B * H
PRINT “AREA OF PARALLELOGRAM “; A
END

USING SUB PROCEDURE

DECLARE SUB AREA (B, H)
CLS
INPUT “ENTER BREADTH”; B
INPUT “ENTER HEIGHT”; H
CALL AREA (B, H)
END

SUB AREA (B, H)
A = B * H
PRINT “AREA OF PARALLELOGRAM ”; A
END SUB

USING FUNCTION PROCEDURE

DECLARE FUNCTION AREA (B, H)
CLS
INPUT “ENTER BREADTH”; B
INPUT “ENTER HEIGHT”; H
AR = AREA( B, H)
PRINT “AREA OF PARALLELOGRAM ”; AR
END

FUNCTION AREA (B, H)
A = B * H
AREA = A
END FUNCTION

27. Display area of triangle when three sides are given.

REM PROGRAM TO DISPLAY AREA OF TRIANGLE WHEN THREE SIDES ARE GIVEN
CLS
INPUT “ENTER VALUE FOR FIRST SIDE ”; A
INPUT “ENTER VALUE FOR SECOND SIDE ”; B
INPUT “ENTER VALUE FOR THIRD SIDE ”; C
S = (A + B + C) / 2
AR = (S * (S – A) * (S – B) * (S – C)) ^ (1 / 2)
PRINT “AREA OF TRIANGLE “; AR
END

USING SUB PROCEDURE

DECLARE SUB AREA (A, B, C)
CLS
INPUT “ENTER VALUE FOR FIRST SIDE ”; A
INPUT “ENTER VALUE FOR SECOND SIDE ”; B
INPUT “ENTER VALUE FOR THIRD SIDE ”; C
CALL AREA (A, B, C)
END

SUB AREA (A, B, C)
S = (A + B + C) / 2
AR = (S * (S – A) * (S – B) * (S – C)) ^ (1 / 2)
PRINT “AREA OF TRIANGLE”; AR
END SUB

USING FUNCTION PROCEDURE

DECLARE FUNCTION AREA (A, B, C)
CLS
INPUT “ENTER VALUE FOR FIRST SIDE ”; A
INPUT “ENTER VALUE FOR SECOND SIDE ”; B
INPUT “ENTER VALUE FOR THIRD SIDE ”; C
PRINT “AREA OF TRIANGLE ”; AREA(A, B, C)
END

FUNCTION AREA (A, B, C)
S = (A + B + C) / 2
AR = (S * (S – A) * (S – B) * (S – C)) ^ (1 / 2)
AREA = AR
END FUNCTION

Comments

Blogger said…
Did you hear there is a 12 word sentence you can speak to your man... that will trigger deep emotions of love and impulsive attraction for you buried within his heart?

Because hidden in these 12 words is a "secret signal" that triggers a man's instinct to love, adore and guard you with all his heart...

12 Words Will Trigger A Man's Desire Response

This instinct is so built-in to a man's brain that it will drive him to work harder than before to build your relationship stronger.

As a matter of fact, fueling this powerful instinct is so essential to having the best ever relationship with your man that the second you send your man a "Secret Signal"...

...You will instantly find him open his heart and mind to you in such a way he haven't experienced before and he'll perceive you as the only woman in the universe who has ever truly understood him.

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