Program find area and perimeter of square in C.
#include<stdio.h>
int main()
{
int l,A,P;
printf("enter the value of l ");
scanf("%d",&l);
A=l*l;
P=4*l;
printf("the area of square is %d\n",A);
printf("the perimeter of square is %d",P);
return 0;
}
Tags:
C courses