bsc

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

commit 83af356292aa0b840f1d5d3f1cfd5349b9a78cf7
parent e409af09bdfd8c6a5c49f4c42c3812907a20bcce
Author: Amit Dutta <amitdutta4255@gmail.com>
Date:   Mon, 22 Sep 2025 20:40:37 +0530

Add files via upload
Diffstat:
Mtution-c/APC-PRAC-001.c | 17+++++++++++++++--
Mtution-c/APC-PRAC-002.c | 17+++++++++++++++--
Mtution-c/APC-PRAC-003.c | 21+++++++++++++++++++--
Mtution-c/APC-PRAC-004.c | 17+++++++++++++++--
Mtution-c/APC-PRAC-005.c | 21+++++++++++++++++++--
5 files changed, 83 insertions(+), 10 deletions(-)

diff --git a/tution-c/APC-PRAC-001.c b/tution-c/APC-PRAC-001.c @@ -1,2 +1,15 @@ /* WAP to calculate area and perimeter of a rectangle -by accepting and breadth as input. */- \ No newline at end of file +by accepting length and breadth as input. */ +/* Author - Amit Dutta, Date - 18th SEP, 2025 */ + +#include<stdio.h> +int main() { + double length, breadth, area, perimeter; + printf("Enter the length and breadth of the Rectangle : "); + scanf("%lf %lf", &length, &breadth); + area = length * breadth; + perimeter = 2 * (length + breadth); + printf("\nArea of the Rectangle : %g" + "\nPerimeter of the Rectangle : %g", area, perimeter); + return 0; +}+ \ No newline at end of file diff --git a/tution-c/APC-PRAC-002.c b/tution-c/APC-PRAC-002.c @@ -1,2 +1,15 @@ /* WAP to calculate area of a circle using math library -method. Take radius of the circle as input. */- \ No newline at end of file +method. Take radius of the circle as input. */ +/* Author - Amit Dutta, Date - 18th SEP, 2025 */ + +#include <stdio.h> +#include <math.h> +int main() +{ + double r, area; + printf("Enter the radius of the circle : "); + scanf("%lf", &r); + area = M_PI * pow(r, 2); + printf("\nArea of the circle : %g", area); + return 0; +}+ \ No newline at end of file diff --git a/tution-c/APC-PRAC-003.c b/tution-c/APC-PRAC-003.c @@ -1 +1,18 @@ -/* WAP to accept diagonal of a square and calculate area, parimeter */- \ No newline at end of file +/* WAP to accept diagonal of a square and calculate area, parimeter */ +/* Author - Amit Dutta, Date - 18th SEP, 2025 */ + +#include <stdio.h> +#include <math.h> +int main() +{ + double dia, side, area, peri; + printf("Enter the diagonal of the square : "); + scanf("%lf", &dia); + side = dia / sqrt(2); + area = pow(side, 2); + peri = 4 * side; + printf("\nArea of the square : %g" + "\nPerimeter of the square : %g", + area, peri); + return 0; +}+ \ No newline at end of file diff --git a/tution-c/APC-PRAC-004.c b/tution-c/APC-PRAC-004.c @@ -1 +1,14 @@ -/* WAP to calculate and display radius of a circle by taking the area as input. */- \ No newline at end of file +/* WAP to calculate and display radius of a circle by taking the area as input. */ +/* Author - Amit Dutta, Date - 18th SEP, 2025 */ + +#include <stdio.h> +#include <math.h> +int main() +{ + double r, area; + printf("Enter the area of the circle : "); + scanf("%lf", &area); + r = sqrt(area / M_PI); + printf("\nRadius of the circle : %g", r); + return 0; +}+ \ No newline at end of file diff --git a/tution-c/APC-PRAC-005.c b/tution-c/APC-PRAC-005.c @@ -1 +1,18 @@ -/* WAP a program that accept number of days as input and represent it as years, months and days. */- \ No newline at end of file +/* WAP a program that accept number of days +as input and represent it as years, months and days. */ +/* Author - Amit Dutta, Date - 19th SEP, 2025 */ + +#include <stdio.h> +int main() +{ + int days, months, years, temp; + printf("Enter the No. of days : "); + scanf("%d", &days); + temp = days; + years = days / 365; + days = days % 365; + months = days / 30; + days = days % 30; + printf("%d Days = %d Years, %d Months, %d Days", temp, years, months, days); + return 0; +}+ \ No newline at end of file
© 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