Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Basic C program ve and Odd Entrie ng Loo Simple Conditionals and Us er-defined Function Write a program that repetitively requests integer numbers from the
Basic C program
ve and Odd Entrie ng Loo Simple Conditionals and Us er-defined Function Write a program that repetitively requests integer numbers from the user though the keyboard (using printf) and scanf ()) until the user enters 0 when she/he wants to quit. Test each entry for whether the number entered is even or odd. Create two variables that accumulate the values of the numbers entered one for the even numbers and one for the odd numbers. The program shall also ask the name of the user and save it to a string variable. Upon completion of the data entry process (when the user enters 0), the program prints out the name of the user, the number and the sum (cumulative) total of the even numbers entered, and the number and the sum (cumulative) total of the odd numbers entered Use at least one user-defined functions besides main(). Use it to do some non-trivial computations There is no need to save any of the individual values during the program execution- only their cumulative totals and the number of even and odd numbers (separately!) entered. The output should be as follows:Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started