bsc

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

commit 7dd3f9da894b21e4dc0c582191ed53859b5c69cc
parent 1016360b456a1967c63f59efaa5183950d9cde7a
Author: Amit Dutta <amitdutta4255@gmail.com>
Date:   Tue, 16 Sep 2025 21:16:42 +0530

Add files via upload
Diffstat:
ALetusc-exercises/luc002.c | 26++++++++++++++++++++++++++
ALetusc-exercises/luc002.exe | 0
ALetusc-exercises/luc003.c | 21+++++++++++++++++++++
ALetusc-exercises/luc003.exe | 0
4 files changed, 47 insertions(+), 0 deletions(-)

diff --git a/Letusc-exercises/luc002.c b/Letusc-exercises/luc002.c @@ -0,0 +1,26 @@ +/* The length and breadth of a rectangle and radius of a circle +are input through the keyboard. Write a program to calculate the +area and perimeter of the rectangle, and the area and circumference +of the circle. */ +/* Author - Amit Dutta, Date - 16th SEP, 2025 */ +/* Let Us C; Page - 19; Chap- 1; QNo.: F(b) */ + +#include<stdio.h> +#include<math.h> +int main() { + double len, bre, r, area_r, per, area_c, cir; + printf("Enter the length and breadth of the rectangle : "); + scanf("%lf %lf", &len, &bre); + printf("Enter the Radius of the circle : "); + scanf("%lf", &r); + area_r = len * bre; + per = 2 * (len + bre); + area_c = M_PI * r * r; + cir = 2 * M_PI * r; + printf("\nArea of Rectangle : %lf" + "\nPerimeter of Rectangle : %lf" + "\nArea of Circle : %lf" + "\nCircumference of Circle : %lf", + area_r, per, area_c, cir); + return 0; +} diff --git a/Letusc-exercises/luc002.exe b/Letusc-exercises/luc002.exe Binary files differ. diff --git a/Letusc-exercises/luc003.c b/Letusc-exercises/luc003.c @@ -0,0 +1,21 @@ +/* Paper of size AO has dimensions 1189 mm x 841 mm. +Each subsequent size A(n) is defined as A(n-1) cut in +half, parallel to its shorter sides. Thus, paper of +size A1 would have dimensions 841 mm x 594 mm. Write +a program to calculate and print paper sizes A0,  +A1, A2, ... A8. */ + +#include<stdio.h> +#include<math.h> +int main() { + double s_long = 1189.0, s_short = 841.0, temp; + int i; + printf("A0 Dimension : %g mm x %g mm", floor(s_long), floor(s_short)); + for (i = 1; i <= 8; i++) { + temp = s_long; + s_long = s_short; + s_short = temp / 2; + printf("\nA%d Dimension : %g mm x %g mm", i, floor(s_long), floor(s_short)); + } + return 0; +} diff --git a/Letusc-exercises/luc003.exe b/Letusc-exercises/luc003.exe Binary files differ.
© 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