Practice Program







  • Calculate area of the rectangle?By taking length and breadth from the user.
  • void main()
    {
        float l,b,Area;
        //Area of circle = 3.14*radius*radius
    
    
        printf("Enter the length of the rectangle:");
        scanf("%f",&l);
    
       printf("Enter the breadth  of the rectangle:");
        scanf("%f",&b);
    
        Area = l*b;
    
        printf("\nArea of rectangle is %f",Area);
    
    
    }
    

    Output1
    Enter the length of the rectangle:1.2
    Enter the breadth of the rectangle:4.5
    Area of the rectangle is 5.400000.
    Output2
    Enter the length of the rectangle:4.2
    Enter the breadth of the rectangle:4.5
    Area of the rectangle is 18.900000.
    Output3
    Enter the length of the rectangle:2.2
    Enter the breadth of the rectangle:6.5
    Area of the rectangle is 14.300000.