TRAIANGLE CAN BE FORMED OR NOT, EQUILATERAL, RIGHT ANGLED TRIANGLE



143. WAP to input three sides of a triangle and determine whether a triangle can be formed or not.

CLS
INPUT “ENTER THREE SIDES OF A TRIANGLE”; A,B,C
IF (A + B) > C AND (B + C) > A AND (A + C) > B THEN
PRINT “THE TRIANGLE CAN BE FORMED”
ELSE
PRINT “THE TRIANGLE CANNOT  BE FORMED”
END IF
END

USING SUB PROCEDURE

DECLARE SUB CHECK (A, B, C)
CLS
INPUT “ENTER THREE SIDES OF A TRIANGLE”; A,B,C
CALL CHECK (A, B, C)
END

SUB CHECK (A, B, C)
IF (A + B) > C AND (B + C) > A AND (A + C) > B THEN
PRINT “THE TRIANGLE CAN BE FORMED”
ELSE
PRINT “THE TRIANGLE CANNOT  BE FORMED”
END IF
END SUB

USING FUNCTION PROCEDURE

DECLARE FUNCTION CHECK$ (A, B, C)
CLS
INPUT “ENTER THREE SIDES OF A TRIANGLE”; A,B,C
PRINT CHECK$ (A,B,C)
END

FUNCTION CHECK$ (A, B, C)
IF (A + B) > C AND (B + C) > A AND (A + C) > B THEN
CHECK$ =  “THE TRIANGLE CAN BE FORMED”
ELSE
CHECK$ = “THE TRIANGLE CANNOT  BE FORMED”
END IF
END FUNCTION


144. WAP to input three sides of a triangle and determine whether a triangle is right angled triangle or not.

CLS
INPUT “ENTER HEIGHT, BASE AND PERPENDICULAR”; H, B, P
IF H ^ 2 = (B ^ 2 + P ^ 2) THEN
PRINT “IT IS A RIGHT ANGLED TRIANGLE”
ELSE
PRINT “IT IS NOT A RIGHT ANGLED TRIANGLE”
END IF
END

USING SUB PROCEDURE

DECLARE SUB CHECK (H, B, P)
CLS
INPUT “ENTER HEIGHT, BASE AND PERPENDICULAR”; H, B, P
CALL CHECK (H, B, P)
END

SUB CHECK (H, B, P)
IF H ^ 2 = (B ^ 2 + P ^ 2) THEN
PRINT “IT IS A RIGHT ANGLED TRIANGLE”
ELSE
PRINT “IT IS NOT A RIGHT ANGLED TRIANGLE”
END IF
END SUB

USING FUNCTION PROCEDURE

DECLARE FUNCTION CHECK$ (H, B, P)
CLS
INPUT “ENTER HEIGHT, BASE AND PERPENDICULAR”; H, B, P
PRINT CHECK$ (H, B, P)
END

FUNCTION CHECK$ (H, B, P)
IF H ^ 2 = (B ^ 2 + P ^ 2) THEN
CHECK$  = “IT IS A RIGHT ANGLED TRIANGLE”
ELSE
CHECK$  = “IT IS NOT A RIGHT ANGLED TRIANGLE”
END IF
END FUNCTION




145. WAP to input three angles of a triangle and determine whether a triangle is right angled triangle or not.

CLS
INPUT “ENTER THREE ANGLES OF A TRIANGLE”; A,B,C
IF A = 90 OR B = 90 OR C = 90 THEN
PRINT “IT IS A RIGHT ANGLED TRIANGLE”
ELSE
PRINT “IT IS NOT A RIGHT ANGLED TRIANGLE”
END IF
END

USING SUB PROCEDURE

DECLARE SUB CHECK (A, B, C)
CLS
INPUT “ENTER THREE SIDES OF A TRIANGLE”; A,B,C
CALL CHECK (A, B, C)
END

SUB CHECK (A, B, C)
IF A = 90 OR B = 90 OR C = 90 THEN
PRINT “IT IS A RIGHT ANGLED TRIANGLE”
ELSE
PRINT “IT IS NOT A RIGHT ANGLED TRIANGLE”
END IF
END SUB

USING FUNCTION PROCEDURE

DECLARE FUNCTION CHECK$ (A, B, C)
CLS
INPUT “ENTER THREE SIDES OF A TRIANGLE”; A,B,C
PRINT CHECK$ (A,B,C)
END

FUNCTION CHECK$ (A, B, C)
IF A = 90 OR B = 90 OR C = 90 THEN
CHECK$ =  “IT IS A RIGHT ANGLED TRIANGLE”
ELSE
CHECK$ =  “IT IS NOT A RIGHT ANGLED TRIANGLE”
END IF
END FUNCTION


146. WAP to input three sides of a triangle and determine whether a triangle is equilateral triangle or
not.

CLS
INPUT “ENTER THREE SIDES OF A TRIANGLE”; A,B,C
IF A = B AND B = C THEN
PRINT “IT IS A EQUILATERAL TRIANGLE”
ELSE
PRINT “IT IS NOT A EQUILATERAL TRIANGLE”
END IF

USING SUB PROCEDURE

DECLARE SUB CHECK (A, B, C)
CLS
INPUT “ENTER THREE SIDES OF A TRIANGLE”; A,B,C
CALL CHECK (A, B, C)
END

SUB CHECK (A, B, C)
IF A = B AND B = C THEN
PRINT “IT IS A EQUILATERAL TRIANGLE”
ELSE
PRINT “IT IS NOT A EQUILATERAL TRIANGLE”
END IF
END SUB

USING FUNCTION PROCEDURE

DECLARE FUNCTION CHECK$ (A, B, C)
CLS
INPUT “ENTER THREE SIDES OF A TRIANGLE”; A,B,C
PRINT CHECK$ (A,B,C)
END

FUNCTION CHECK$ (A, B, C)
IF A = B AND B = C THEN
CHECK$ =  “IT IS A EQUILATERAL TRIANGLE”
ELSE
CHECK$ = “IT IS NOT A EQUILATERAL TRIANGLE”
END IF
END FUNCTION



147. WAP to input three sides of a triangle and determine whether a triangle is equilateral, isosceles or scalene triangle or not.

CLS
INPUT “ENTER THREE SIDES OF A TRIANGLE”; A,B,C
IF A = B AND B = C THEN
PRINT “IT IS A EQUILATERAL TRIANGLE”
ELSEIF A = B OR B = C OR C = A THEN
PRINT “IT IS ISOSCELES TRIANGLE”
ELSEIF A < > B AND B < > C THEN
PRINT “ IT IS A SCALENE TRIANGLE”
END IF
END

USING SUB PROCEDURE

DECLARE SUB CHECK (A, B, C)
CLS
INPUT “ENTER THREE SIDES OF A TRIANGLE”; A,B,C
CALL CHECK (A, B, C)
END

SUB CHECK (A, B, C)
IF A = B AND B = C THEN
PRINT “IT IS A EQUILATERAL TRIANGLE”
ELSEIF A = B OR B = C OR C = A THEN
PRINT “IT IS ISOSCELES TRIANGLE”
ELSEIF A < > B AND B < > C THEN
PRINT “ IT IS A SCALENE TRIANGLE”
END IF
END SUB

USING FUNCTION PROCEDURE

DECLARE FUNCTION CHECK$ (A, B, C)
CLS
INPUT “ENTER THREE SIDES OF A TRIANGLE”; A,B,C
PRINT CHECK$ (A,B,C)
END

FUNCTION CHECK$ (A, B, C)
IF A = B AND B = C THEN
CHECK$ = “IT IS A EQUILATERAL TRIANGLE”
ELSEIF A = B OR B = C OR C = A THEN
CHECK$ =  “IT IS ISOSCELES TRIANGLE”
ELSEIF A < > B AND B < > C THEN
CHECK$ =  “ IT IS A SCALENE TRIANGLE”
END IF
END FUNCTION

Comments

Blog27999 said…
You should see how my colleague Wesley Virgin's biography begins with this SHOCKING and controversial VIDEO.

Wesley was in the military-and shortly after leaving-he revealed hidden, "MIND CONTROL" tactics that the government and others used to get anything they want.

As it turns out, these are the EXACT same tactics tons of famous people (notably those who "come out of nowhere") and the greatest business people used to become rich and famous.

You probably know how you only use 10% of your brain.

That's because most of your brainpower is UNCONSCIOUS.

Maybe that expression has even occurred IN YOUR own mind... as it did in my good friend Wesley Virgin's mind about 7 years ago, while driving an unlicensed, beat-up bucket of a car with a suspended license and $3.20 on his bank card.

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

You took part in those questions, ain't it so?

Your own success story is waiting to happen. You just have to take a leap of faith in YOURSELF.

CLICK HERE TO LEARN WESLEY'S SECRETS

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