bsc

Comprehensive codebase and cou...
Log | Files | Refs | Activity | README | LICENSE

root / semester_1 / tuition-c / P014.c

P014.c (397B)


      1 /* WAP to accept the diagonal of
      2 square. Find and display the area and
      3 perimeter of the square. */
      4 
      5 #include<stdio.h>
      6 #include<math.h>
      7 int main() {
      8 	double d, side, area, per;
      9 	printf("Enter the diagonal : ");
     10 	scanf("%lf", &d);
     11 	side =  d / sqrt (2);
     12 	area = side * side;
     13 	per = 4 * side;
     14 	printf("\nArea of the Square      : %lf"
     15 		   "\nPerimeter of the Square : %lf", area, per);
     16 	return 0;
     17 }
© notamitgamer • Site Built: 2026-09-05 01:53:16 UTC • git-mirror commit: c170d72 [view raw info]
Originally created with stagit • modified by notamitgamer
Forked from github.com/notamitgamer/git-mirror