Question: PROBLEM 1 A) computeRing Area Write a function named computeRingArea that takes in the radii, a and b, of the inner and outer rings respectively,
PROBLEM 1 A) computeRing Area Write a function named computeRingArea that takes in the radii, a and b, of the inner and outer rings respectively, and returns the area of the ring (which is shaded in the figure below). B) Odds and Evens Write a function named numOddsAndEvens that takes in a vector of integers, x, and returns two values, numOddsand numEvens. numOdds is the number of odd-valued elements in x, and numEvens is the number of even-valued elements in x. C) FizzBuzz Write a function named fizzBuzz that takes in an integer n. For each value in the range 1 to n, the program displays one of three words: fizz (if the number is divisible by 3), buzz (if the number is divisible by 5), or just the number (e.g. 1, 2, 4). The function does not return any value
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
