Write a program to display a rectangle with red outline, length 50 units and breadth 40 units. The starting point for the rectangle should be row 20 and column 40.
Answers
Answered by
0
Answer:
//CPP program to find area
// and perimeter of rectangle
#include<bits/stdc++.h>
using namespace std;
// Utility function
int areaRectangle(int a, int b)
{
int area = a * b;
return area;
}
int perimeterRectangle(int a, int b)
{
int perimeter = 2*(a + b);
return perimeter;
}
// Driver program
int main()
{
int a = 50;
int b = 40;
cout << "Area = " << areaRectangle(a, b) << endl;
cout << "Perimeter = " << perimeterRectangle(a, b);
return 0;
Similar questions