Easy C++ Program to find the area of a rectangle with output for beginners

Easy C++ Program to find the area of a rectangle with output

How to make a C++ program in codeblocks 



 Formula used : -Area of rectangle = Length*breadth

IMAGE SAMPLE: -


c++ program codeblock


#include<iostream>
using namespace std;
int main()
{
    int length,breadth,area;
    cout<<"\nenter the length of rectangle ";
    cin>>length;
    cout<<"\nenter the breadth of rectangle ";
    cin>>breadth;
    area=length*breadth;
    cout<<"\nthe area of the rectangle is : "<<area;
    return 0;
}


output

here we take length=8 and breadth=5.

So, Area will be 8*5=40.



                                                                                        - Jai Hind









Easy C++ Program to find the area of a rectangle with output for beginners

Easy C++ Program to find the area of a rectangle with output for beginners  Easy C++ Program to find the area of a rectangle with output for beginners Reviewed by mushrafkhan772 on June 17, 2018 Rating: 5

7 comments:

Powered by Blogger.