Question: c++ a. Write a function called loopDecrement() that takes a negative number as a parameter and uses a loop to repeatedly print the value of

 c++ a. Write a function called loopDecrement() that takes a negative
c++

a. Write a function called loopDecrement() that takes a negative number as a parameter and uses a loop to repeatedly print the value of the input, increasing the value by 0.25 with each iteration of the loop, as long as the value of the variable remains negative. Upon exiting the loop also print the number of times the loop has iterated. b. Create an enumeration of colors. Write a function called printColor() that iterates over the enumeration and uses a switch statement to print the names of the colors. c. Write a function called smallestInArray () which takes an int array and int array size as parameters and prints to the console the smallest number in the array. d. Demonstrate the use of these functions on test input in main(). In other words, in main() make up variables as inputs to your functions and show that your functions work correctly

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!