Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

Write a C program

+7 votes
asked Mar 11, 2022 by محمد جميل (200 points)
Write a c program that keeps reading integer numbers until a zero is entered.
The program calculates the summation for the numbers that have odd number of digits and the product for numbers that have even number of digits.

for example:

if you entered 11  22  0

the program will print

sum=0product=242

if you entered 2  444  55  0

the program will print

sum=446product=55

1 Answer

+9 votes
answered Mar 11, 2022 by Peter Minarik (84,720 points)
It seems like homework or a school assignment.

Please, give your best shot to try to solve it. If you get stuck, share what you have done that far and people will be more than happy to help you fix the problems and finish the code.

Good luck!
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...