Home / Expert Answers / Computer Science / in-c-language-write-a-program-with-two-functions-nbsp-function-1-int-number-int-a-int-b-thi-pa880

(Solved): In C language, write a program with two functions:  Function 1: int number( int A, int B) - thi ...



In C language, write a program with two functions: 

Function 1: int number( int A, int B) - this function will read a number from the user and only accepted if in the range A to B. If outside, ask again until acceptable 

Function 2: void printArr ( int K [ ], int many) - this function will print items from list K on one line

Main: use 2 functions above to 

- create array size 50

- ask user to enter numbers until sum(total) is over 60 ( only numbers between 10 and 20 are allowed (function 1))

- store each valid number into an array

- after loop is complete, report how many values and the sum

- print out the list of numbers using functions 2 

 



We have an Answer from Expert

View Expert Answer

Expert Answer


Code: #include // Function 1 int number (int A, int B) { int num; printf ("Enter number between %d and %d: ", A, B); scanf (
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe