Question: Objective: Working with functions In this lab, you need to create a C program that asks the user to input a positive integer number and
Objective: Working with functions In this lab, you need to create a C program that asks the user to input a positive integer number and displays the sum of its digits and checks whether there is a repeated digit in the sum of its digits. The program should stop when the user input is 0 Your program should have at least the following 2 functions (procedures): 1)int reverse (int num) takes an integer number as an input and returns an integer number that represents the reverse of the given number. 2) bool repDigit (int num) takes the reverse number returned from reverse() function. The function returns true if any of the digits of the input number appear more than once; otherwise returns false. A Sample interaction is as follow: Please enter a positive integer number: -365 Invalid Input. Please enter a positive integer number: 1356 6531 has no repeated digit. Please enter a positive integer number: 25350 5352 has at least one repeated digit Please enter a positive integer number: 0 End
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
