C++ Program to Find Perimeter of Square

Write C++ Program to Find Perimeter of Square

// CPP Program to Find Perimeter of Square

#include <iostream>

using namespace std;

int main()
{
    float side = 3, area;

    // Formula to compute perimeter of square
	area = 4 * side ;

	cout << "Perimeter of Square having side " << side << " is :--> " << area;


	return 0;
}

Output:

Perimeter of Square having side 3.00 is :--> 12.00

≪ Previous | Next ≫