Area of Rectangle in C++ - Learn Engineering

All the news and updates relevant to Engineering. You can also Write a post here

Breaking

Friday, June 12, 2020

Area of Rectangle in C++



C++ PROGRAM TO FIND THE AREA OF RECTANGLE

Sample Test Case    :    Enter length and breadth  : 5  2

Sample Test Case    :    Area of Rectangle : 10.0


CODE

#include <iostream>
using namespace std;
int main() 
{
    float a,b,area;
    cout<<"Enter length and Breadth :";
    cin>>a>>b;
    area=a*b;
    cout<<"Area of Rectangle :"<<area;
    return 0;
}

No comments:

Post a Comment