Program in C to calculate the area and perimeter of square

#include<stdio.h>
#include<conio.h>

void main()
{
float s,a,p;
clrscr();
printf(“enter the s value:\n”);
scanf(“%f”,&s);
a=s*s;
p=4*s;
printf(“area=%f\n perimeter=%f\n”,a,p);
getch();
}


Post a Comment