DSA 1.23 : monolithic program

PHOTO EMBED

Tue Mar 07 2023 15:11:01 GMT+0000 (Coordinated Universal Time)

Saved by @saakshi #c++

#include <iostream>
using namespace std;

int main() 
{
    int length = 0, breadth =0;
    cout << "Enter length and breadth : ";
    cin >> length >> breadth;
    
    int area = length*breadth;
    cout <<"Area is : "<<area << endl;
    
    int peri = 2*(length*breadth);
    cout <<"perimeter is :"<<peri;

    return 0;
}
content_copyCOPY

this is monolithic style of programming where everything is written inside the main function.