bsc

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

P011.c (578B)


      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 /* The time period of a simple pendulam is
      8 given by the formula :
      9 	t = 2 * pi * square_root(l / g)
     10 WAP to calculate T take length(L) and gravity
     11 as input
     12 */
     13 
     14 #include<stdio.h>
     15 #include<math.h>
     16 int main() {
     17 	double l, g, t;
     18 	printf("Enter the Length and Gravity measures : ");
     19 	scanf("%lf %lf", &l, &g);
     20 	t = 2 * M_PI * sqrt(l / g);
     21 	// using M_PI variable for PI value from math.h header file
     22 	printf("\nTime Period : %lf", t);
     23 	return 0;
     24 }
© 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