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.
Login
Login
OnlineGDB Q&A
Questions
Unanswered
Tags
Ask a Question
Ask a Question
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
needhelp
Your answer
Your name to display (optional):
Email me at this address if my answer is selected or commented on:
Email me if my answer is selected or commented on
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please
log in
or register.
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!
Your comment on this answer:
Your name to display (optional):
Email me at this address if a comment is added after mine:
Email me if a comment is added after mine
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please
log in
or register.
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.
...