Programming Is Kinda Fun - Part 2

1. WAP to display area of rectangle.
=> CLS
     INPUT "Enter length" ; l
     INPUT "Enter breadth" ; b
     A = l * b
     PRINT "Area of rectangle = "; A
     END

2. WAP to display area of square.
=>CLS
    INPUT "Enter length" ; l
    A = l ^ 2
    PRINT "Area of square = " ; A
    END

3. WAP to display area of circle.
=>CLS
    INPUT "Enter radius" ; r
    A =  22/7 ^ 2
    PRINT "Area of circle = " ; A
    END

4. WAP to display perimeter of rectangle.
=>CLS
    INPUT "Enter length" ; l
    INPUT "Enter breadth" ; b
    P = 2 * (l + b)
    PRINT "Perimeter of rectangle  = " ; P
    END

5. WAP to display perimeter of square.
=>CLS
    INPUT "Enter length" ; l
    P = 4 * l
    PRINT "Perimeter of square = " ; P
    END

6. WAP to find circumference of circle.
=>CLS
    INPUT "Enter radius" ; r
    C = 2 * 22 / 7 * r
    PRINT "Circumference of circle = "; C
    END

7. WAP to find area and perimeter of rectangle.
=>CLS
    INPUT "Enter length" ; l
    INPUT "Enter breadth " ; b
    A = l * b
    P = 2 * ( l + b )
    PRINT "Area of rectangle = "; A
    PRINT "Perimeter of rectangle = "; P
    END

8. WAP to find area and perimeter of square.
=>CLS
    INPUT "Enter length" ; l
    A = l ^ 2
    P = 4 * l
    PRINT "Area of square = "; A
    PRINT "Perimeter of square = "; P
    END

9. WAP to find area and circumference of circle.
=>CLS
    INPUT "Enter radius "; r
    A = 22/7 * r ^ 2
    C = 2 * 22/ 7 * r
    PRINT "Area of circle = "; A
    PRINT "Circumference of circle = "; C
    END

RESULTS
1.  
2. 
3. 
4.
5.
6.
7.
8. 
9.


Comments