English, asked by rashidkhna73, 4 months ago

write program in Q Basics to find the area of circle and rectangle​

Answers

Answered by hassanahmad7679
1

Answer:

  • 1STMETHOD

CLS

INPUT "ENTER LENGTH OF RECTANGLE"; L

INPUT "ENTER BREADTH OF RECTANGLE"; B

INPUT "ENTER RADIUS OF A CIRCLE"; R

PRINT "AREA OF THE RECTANGLE "; L*B

PRINT "AREA OF THE CIRCLE"; 2*3.14*R

END

  • 2ND METHOD( Using SELECTCASE )

CLS

INPUT "ENTER LENGTH OF RECTANGLE"; L

INPUT "ENTER BREADTH OF RECTANGLE"; B

INPUT "ENTER RADIUS OF A CIRCLE"; R

PRINT "TYPE 'A' TO GET TOTAL AREA OF THE RECTANGLE"

PRINT "TYPE 'B' TO GET AREA OF THE CIRCLE"

INPUT "ENTER YOUR CHOICE:"; CH

CH = UCASE(CH)

SELECT CASE CH

CASE "A"

PRINT "AREA OF THE RECTANGLE "; L*B

CASE "B"

PRINT "AREA OF THE CIRCLE"; 2*3.14*R

CASE ELSE

PRINT "INVALID ENTRY, TRY AGAIN !"

END SELECT

Answered by SSGAMINGYT
1

Answer:

mark me ad brilliant

Explanation:

You can calculate area of a triangle using Heron's or Hero's formula:

Note:We are assuming that the triangle already exists(for a triangle to exist the sum of any two sides of a triangle must be greater than the third side).

Similar questions