Write a program to calculate students’ average test scores and their grades.
You may assume the following input data:
Johnson 85 83 77 91 76
Aniston 80 90 95 93 48
Cooper 78 81 11 90 73
Gupta 92 83 30 69 87
Blair 23 45 96 38 59
Clark 60 85 45 39 67
Kennedy 77 31 52 74 83
Bronson 93 94 89 77 97
Sunny 79 85 28 93 82
Smith 85 72 49 75 63
Use three arrays: a one-dimensional array to store the students’ names, a (parallel) two-dimensional array to store the test scores, and a parallel one dimensional array to store grades. Your program must contain at least the following functions: a function to read and store data into two arrays, a function to calculate the average test score and grade, and a function to output the results. Have your program also output the class average.
Write a program that allows the user to enter the last names of five candidates in a local election and the number of votes received by each candidate. The program should then output each candidate’s name, the number of votes received, and the percentage of the total votes received by the candidate. Your program should also output the winner of the election.
sample output:
Candidate Votes Received % of Total Votes
Johnson 5000 25.91
Miller 4000 20.73
Total 9000
The winner of the election is Johnson.
Write a function, smallestIndex, that takes as parameters an int array and its size and returns the index of the first occurrence of the smallest element in the array. Also, write a program to test your function.
Write a program that declares an array alpha of 50 values of type double. Initialize the array so that the first 25 values are equal to the square of the index variable, and the last 25 values are equal to the three times the index variable. Output the array so that 10 elements per line are printed.
Write an application that stores 12 integers in an array. Display the ingeter from first to last, and then display the integers from last to first.
Create a class Number with a pointer as a data data member of integer type. Write user defined copy constructor to the class and implement the deep copy for the Number class objects. So when a new object is created from an old object of the Number class, pointer data member can point different memory block.
When we multiply different numbers they come with different sign such as (Plus (+), Negative (-)) suppose : (-2) * (+2) = -4, your task is to write such an application that show(Display) the sign of four real number after multiplication by using sequence of if operator.[Note you can’t calculate it] Hint : logical operator
When we multiply different numbers they come with different sign such as (Plus (+), Negative (-)) suppose : (-2) * (+2) = -4, your task is to write such an application that show(Display) the sign of four real number after multiplication by using sequence of if operator.[Note you can’t calculate it]
Make a program that will compute the total
bill of the customer. The program will input
item purchased, quantity, price and cash
given by the customer. It will display the
total bill and the change of the customer if
the cash is greater than the total bill. If
the customer reaches 800 pesos, he/she will
avail 30% discount of his/her total bill.
Use if else statement and repetition structure
and display the "DO YOU WANT TO TRY AGAIN? Y/N?"