Question: Write a function named totalEvens that computes the total number of even integers that are less than a given threshold. The function takes one parameter:
Write a function named totalEvens that computes the total number of even integers that are less than a given threshold. The function takes one parameter: 1. threshold, an integer The function repeatedly asks the user to enter a number until -1 is entered. The function returns the total number of even integers less then threshold. For example, if threshold is 10 and user enters: 5 4 7 20 12 -1 The function would return 1. (USE C++)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
