bsc

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

P014.c (534B)


      1 /*
      2  * Author: Amit Dutta (amitdutta4255@gmail.com) | Date: 12 Dec 2025
      3  * Repo: https://github.com/notamitgamer/bsc
      4  * License: MIT
      5  */
      6 
      7 /* WAP to accept the diagonal of
      8 square. Find and display the area and
      9 perimeter of the square. */
     10 
     11 #include<stdio.h>
     12 #include<math.h>
     13 int main() {
     14 	double d, side, area, per;
     15 	printf("Enter the diagonal : ");
     16 	scanf("%lf", &d);
     17 	side =  d / sqrt (2);
     18 	area = side * side;
     19 	per = 4 * side;
     20 	printf("\nArea of the Square      : %lf"
     21 		   "\nPerimeter of the Square : %lf", area, per);
     22 	return 0;
     23 }
© notamitgamer • Site Built: 2026-07-21 13:58:23 UTC • git-mirror commit: 1037f62 [view raw info]
Originally created with stagit • modified by notamitgamer
Forked from github.com/notamitgamer/git-mirror