commit 1fb365fb3cac0fa5dfa477a9b46a719aa7f995f2
parent 8dc51e5a4cc76212940855e944c6f0cd920c8550
Author: Amit Dutta <amitdutta4255@gmail.com>
Date: Mon, 22 Sep 2025 20:45:23 +0530
Update APC-PRAC-001.c
Diffstat:
1 file changed, 15 insertions(+), 0 deletions(-)
diff --git a/tution-c/APC-PRAC-001.c b/tution-c/APC-PRAC-001.c
@@ -1 +1,16 @@
+/* WAP to calculate area and perimeter of a rectangle
+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;
+
+}