Practical - 9 - Write a program to find the area of Rectangle.

Practical - 9

Aim: Write a program to find the area of Rectangle.

 

Program:

#include <stdio.h>

#include <conio.h>

 

void main()

{

    clrscr();

    int length, breadth, area;

 

    printf("Enter the Length = ");

    scanf("%d", &length);

 

    printf("Enter the Breadth = ");

    scanf("%d", &breadth);

 

    area = length * breadth;

 

    printf("\nThe Area = %d", area);

    getch();

}

 

 

Output:

Enter the Length = 7

Enter the Breadth = 5

 

The Area = 35

 

 

Algorithm:

 

Step-1: START

Step-2: Declare length, breadth, area.

Step-3: Enter the value of length and breadth.

Step-4: area = length * breadth.

Step-5: Display area.

Step-6: STOP.

 

Flowchart:




 

Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.