bsc

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

luc002.c (949B)


      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 length and breadth of a rectangle and radius of a circle
      8 are input through the keyboard. Write a program to calculate the
      9 area and perimeter of the rectangle, and the area and circumference
     10 of the circle. */
     11 /* Let Us C; Page - 19; Chap- 1; QNo.: F(b) */
     12 
     13 #include <stdio.h>
     14 #include <math.h>
     15 int main()
     16 {
     17 	double len, bre, r, area_r, per, area_c, cir;
     18 	printf("Enter the length and breadth of the rectangle : ");
     19 	scanf("%lf %lf", &len, &bre);
     20 	printf("Enter the Radius of the circle : ");
     21 	scanf("%lf", &r);
     22 	area_r = len * bre;
     23 	per = 2 * (len + bre);
     24 	area_c = M_PI * r * r;
     25 	cir = 2 * M_PI * r;
     26 	printf("\nArea of Rectangle       : %lf"
     27 		   "\nPerimeter of Rectangle  : %lf"
     28 		   "\nArea of Circle          : %lf"
     29 		   "\nCircumference of Circle : %lf",
     30 		   area_r, per, area_c, cir);
     31 	return 0;
     32 }
© 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