Function

Please help me create a program which consists of area and perimeter.
i managed to do till area but then i dont know how to continue with perimeter.

closed account (o3hC5Di1)
Hi there,

Please provide us a little bit more information as well as the code you have already written so far.
That will make us able to help you better.

All the best,
NwN
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <iostream>

using namespace std;

int main()
{
    int area = 1;
    int perimeter = 4;

    cout << "Area of square with 1 m side:  " << area << " m^2\n";
    cout << "Perimeter of sqare with 1 m side:  " << perimeter << " m\n";

    return 0;
}
Last edited on
Topic archived. No new replies allowed.