C Program to Find Perimeter of Square

C Program to Find Perimeter of Square

Write C Program to Find the Perimeter of the Square

//Write a C Program to Find Perimeter of Square

#include <stdio.h>

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

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

	printf("Perimeter of Square having side %0.2f is :--> %0.2f", side, area);


	return 0;
}

Output:

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