P035.c (789B)
1 /* 2 * Author: Amit Dutta (amitdutta4255@gmail.com) | Date: 12 Dec 2025 3 * Repo: https://github.com/notamitgamer/bsc 4 * License: MIT 5 */ 6 7 /* WAP to input an int number and display the product of the successors 8 of even digits of the number entered by user. */ 9 10 #include <stdio.h> 11 #include <stdbool.h> 12 int main() 13 { 14 int n, res = 1, temp; 15 bool status = false; 16 printf("Enter the number : "); 17 scanf("%d", &n); 18 temp = n; 19 while (temp > 0) 20 { 21 if ((temp % 10) % 2 == 0) 22 { 23 res *= (temp % 10) + 1; 24 status = true; 25 } 26 temp /= 10; 27 } 28 if (!status) 29 printf("\nThere is no even digits."); 30 else 31 printf("\nThe product of the successors of even digits of the number %d is : %d", n, res); 32 return 0; 33 }