Dremendo Tag Line
t

Print area of a rectangle in C++

cout - Question 15

In this question, we will see how to print the area of a rectangle in C++ programming using the cout statement. To know more about cout statement click on the cout statement lesson.

Q15) Write a program in C++ to find the area of a rectangle if length is 10 and breadth is 5.

Formula: area = length * breadth

Program

#include <iostream>
#include <conio.h>

using namespace std;

int main()
{
    cout<<"Length=10\n";
    cout<<"Breadth=5\n";
    cout<<"Area="<<10*5;
    return 0;
}

Output

Length=10
Breadth=5
Area=50
video-poster