commit 3e33a23a05dbfd9d7cd2f8bce6933d83428c1ba0
parent 82390a1594c03e26201ea15e7e98e0838d963a38
Author: Amit Dutta <amitdutta4255@gmail.com>
Date: Mon, 8 Sep 2025 21:38:03 +0530
Delete tution-c/1234.c
Diffstat:
1 file changed, 0 insertions(+), 28 deletions(-)
diff --git a/tution-c/1234.c b/tution-c/1234.c
@@ -1,28 +0,0 @@
-// Write a program (WAP) to print the sum and product of digits of an integer.
-
-#include<stdio.h>
-
-int main() {
- int inp, result_sum = 0, result_product = 1, temp;
- printf("Please enter the number : ");
- scanf("%d",&inp);
- printf("\n");
-
- if (inp < 0) {
- printf("\nPlease enter a valid non negetive integer.");
- return 1;
- }
-
- temp = inp;
- while (temp != 0 ) {
- result_sum = result_sum + (temp % 10);
- result_product = result_product * (temp % 10);
- temp = temp / 10;
- }
-
- printf("\nSum of the digits of the input number '%d' is : %d"
- "\nProduct of the digits of the input number '%d' is : %d",
- inp, result_sum, inp, result_product);
- return 0;
-}
-