commit 846e150a7dbbd09304064113106ebc0de1c2d383
parent 8226140f5765c60413c7b70e33e12189b1867397
Author: Amit Dutta <amitdutta4255@gmail.com>
Date: Tue, 23 Sep 2025 13:26:12 +0530
Add files via upload
Diffstat:
2 files changed, 41 insertions(+), 5 deletions(-)
diff --git a/tution-c/APC-PRAC-006.c b/tution-c/APC-PRAC-006.c
@@ -1 +1,17 @@
-/* WAP that accept seconds as input and represent it an hours, minutes and seconds. */-
\ No newline at end of file
+/* WAP that accept seconds as input and represent it an hours, minutes and seconds. */
+/* Author - Amit Dutta, Date - 19th SEP, 2025 */
+
+#include <stdio.h>
+int main()
+{
+ int sec, hours, minutes, temp;
+ printf("Enter the no of seconds : ");
+ scanf("%d", &sec);
+ temp = sec;
+ hours = sec / 3600;
+ sec = sec % 3600;
+ minutes = sec / 60;
+ sec = sec % 60;
+ printf("\n%d Seconds = %d Hours, %d Minutes, %d Seconds.", temp, hours, minutes, sec);
+ return 0;
+}+
\ No newline at end of file
diff --git a/tution-c/APC-PRAC-007.c b/tution-c/APC-PRAC-007.c
@@ -1,6 +1,26 @@
-/* WAP that accept basic salary of an employee and display gross salary, net salary generated by below formula.
+/* WAP that accept basic salary of an employee and display gross salary,
+net salary generated by below formula.
DA = 25% of the basic salary.
HRA = 12.5% of the basic salary.
PF = 10% of the basic salary.
gross salary = basic salary + da + hra
- net salary = gross salary - pf */-
\ No newline at end of file
+ net salary = gross salary - pf
+*/
+/* Author - Amit Dutta, Date - 19th SEP, 2025 */
+
+#include <stdio.h>
+int main()
+{
+ double bs, gs, ns, da, hra, pf;
+ printf("Enter the basic salary of the employee : ");
+ scanf("%lf", &bs);
+ da = bs * 0.25;
+ hra = bs * 0.125;
+ pf = bs * 0.10;
+ gs = bs + da + hra;
+ ns = gs - pf;
+ printf("\nGross Salary : %g"
+ "\nNet Salary : %g",
+ gs, ns);
+ return 0;
+}+
\ No newline at end of file