Write a program that reads a length and width of a rectangle and prints its area?? Using C++?
Answers
Answered by
3
Answer:
Program
#include <stdio.h>
int main()
{
int width=5;
int height=10;
int area=width*height;
printf("Area of the rectangle=%d",area);
}
Answered by
1
#include <iostream>
using namespace std;
int main()
{
float length , width , area ;
cout << " enter the length and width : ";
cin >> length >> width ;
area = length * width ;
cout<< " area of rectangle is : '' << area ;
return 0 ;
}
Similar questions