Wap to calculate the area and perimeter of swuare
Source code
#include <stdio.h>
double perimeter(double s){
return (4*s);
}
int main()
{
double side;
printf("\nEnter length of the sides of the square: ");
scanf("%lf",&side);
printf("\nPerimeter of the square is: %lf",perimeter(side));
return 0;
}
Output
Comments
Leave a comment