Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This needs to be written in C programing language. I just need to know what it looks like in C . thank you Make a

This needs to be written in C programing language. I just need to know what it looks like in C. thank you

Make a function with the following declaration: int numberSaver() Your program should operate as follows:

  • Ask a user to input numbers from 1 to 9 continuously, until they input a zero. Assume user will not input anything invalid.
  • Use an array of size 9, where you will store the count of how many times user typed in each number.
  • When user inputs 0, the function should print how many of each number user inputted and return the sum of these numbers.

Your output format & function declaration must match the examples EXACTLY.

Example output:

Input number from 1 to 9 (0 to exit): 9 Input number from 1 to 9 (0 to exit): 4 Input number from 1 to 9 (0 to exit): 5 Input number from 1 to 9 (0 to exit): 4 Input number from 1 to 9 (0 to exit): 0 You typed: 1) 0 time(s) 2) 0 time(s) 3) 0 time(s) 4) 2 time(s) 5) 1 time(s) 6) 0 time(s) 7) 0 time(s) 8) 0 time(s) 9) 1 time(s)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Describe the language accepted by this FA: 2 1 3

Answered: 1 week ago

Question

1-4 How will MIS help my career?

Answered: 1 week ago