Question: C++ 4. Write a program that inputs a series of integers and passes them one at a time to function even which uses the modulus
C++
4. Write a program that inputs a series of integers and passes them one at a time to function even which uses the modulus operator to determine if an integer is even. This function should take an integer argument and return 1 if the integer is even and otherwise. Write a function quality_points that inputs a student's grade average and returns 4 if the student's average is 90-100, 3 if the average is 80-89, 2 if the average is 70-79,1 if the average is 60-69 and 0 if the average is lower than 60. Use this function in a program. 5. Write a program that simulates coin tossing. For each toss of the coin the program should print Heads or Tails. Let the program toss the coin 100 times and count the number of times each side of the coin appears. Print the results. The program should call a separate function fhip that takes no arguments and returns 0 for tails and 1 for heads. 6Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
