bsc

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

root / semester_1 / tuition-c / P011.c

P011.c (441B)


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