Question: Write a C program, q1.c, that reads an integer number n, and a digit d, and checks whether d is present in the number n.
Write a C program, "q1.c", that reads an integer number n, and a digit d, and checks whether d is present in the number n. If it is so, finds out the value of d in the number n. If d occurs more than once in the number n, displays all values of the digit d.
Sample run 1: Please enter an integer: 75659 Please enter a digit: 5 5 is present with value 50 5 is present with value 5000
Sample run 2: Please enter an integer: 75659 Please enter a digit: 3 3 is not present
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
