Soccer Scores
Write a
Player’s Name
Player’s Number
Points Scored by Player
The program should keep an array of 12 of these structures. Each element is for a different player on a team. When the program runs, it should ask the user to enter the data for each player. It should then show a table that lists each player’s number, name, and points scored. The program should also calculate and display the total points earned by the team. The number and name of the player who has earned the most points should also be displayed.
Input Validation: Do not accept negative values for players’ numbers or points scored.
Learn your wayIncludes step-by-step video
Chapter 11 Solutions
STARTING OUT C++,+MATLAB+MYPROGRAMLAB>C
Additional Engineering Textbook Solutions
Artificial Intelligence: A Modern Approach
Starting Out with Java: Early Objects (6th Edition)
Starting Out with C++: Early Objects
Database Concepts (8th Edition)
Modern Database Management (12th Edition)
Introduction To Programming Using Visual Basic (11th Edition)
- (Statistics) Write a program that includes two functions named calcavg() and variance(). The calcavg() function should calculate and return the average of values stored in an array named testvals. The array should be declared in main() and include the values 89, 95, 72, 83, 99, 54, 86, 75, 92, 73, 79, 75, 82, and 73. The variance() function should calculate and return the variance of the data. The variance is obtained by subtracting the average from each value in testvals, squaring the values obtained, adding them, and dividing by the number of elements in testvals. The values returned from calcavg() and variance() should be displayed by using cout statements in main().arrow_forward(Electrical eng.) Write a program that specifies three one-dimensional arrays named current, resistance, and volts. Each array should be capable of holding 10 elements. Using a for loop, input values for the current and resistance arrays. The entries in the volts array should be the product of the corresponding values in the current and resistance arrays (sovolts[i]=current[i]resistance[i]). After all the data has been entered, display the following output, with the appropriate value under each column heading: CurrentResistance Voltsarrow_forwardIn C programming language Question (Array of Structures) a) Write a program that declares a structure student with the following data members; Name (String) RollNo(Integer) CGPA(Float) b) Create an array s1 of 5 elements in main function of type structure student c) Initialize all the structures stored within array. d) Print all array contents.arrow_forward
- Create a structure called Students that holds information like Registration code, name of student and date of admission. Write a program to create an array of structures and enter some data into it (15 records at least). Then ask the user to enter current date. Display the names of those Students who are in the school greater than or equal to 5 years. Note: Using C languagearrow_forwardUsing C++ program : 1.Define an array of 35 of the Car structure variables. Initialize the first three elements with the following data: Make Model Year Cost Ford Taurus 1997 $21000 Honda Accord 1992 $11000 Lamborghini Countach 1997 $200000 2.Write a loop that will step through the array you defined in the previous question, displaying the contents of each elementarrow_forwardTrue or False When you create a numeric array in C#, its elements are set to the value 0 by default.arrow_forward
- Write a program that shows Game sales. The program should use a structure to store the following data about the Game sale: Game company Type of Game (Action, Adventure, Sports etc.) Year of Sale Sale Price The program should use an array of at least 3 structures (3 variables of the same structure). It should let the user enter data into the array, change the contents of any element and display the data stored in the array. The program should have a menu driven interface. Input Validation: When the data for a new game sale is entered, be sure the user enters data for all the fields. No negative amounts should be entered for a “Sale Price” of the Game An example: You will use 1 structure only and then manipulate that for working with the information. The program should use an array of at least 3 structures (3 variables of the same structure). An example of the structure:struct Game{string name;string type;int year;double price;}; So far I have written that ...arrow_forwardCreate a structure Student and ask the user how many students. Create an array which will save the number of students in the input. Ask for the data of the first and last student and display them.arrow_forwardA structure is a collection of values with dissimilar data types, while an array stores values of similar data types. Required: Create a structure to store the student ID, name, course and age in years. Create an array of the above structure to accept and display the values of 5 students.arrow_forward
- Use C++ Programing language. Write a program that simulates a lottery. The program should have an array of five integers named winningDigits, with a randomly generated number in the range of 0 through 9 for each element in the array. The program should ask the user to enter five digits and should store them in a second integer array named player. The program must compare the corresponding elements in the two arrays and count how many digits match. For example, the following shows the winningDigits array and the Player array with sample numbers stored in each. There are two matching digits, elements 2 and 4. WinningDigits 7 4 9 1 3 player 4 2 9 7 3 Once the user has entered a set of numbers, the program should display the winning digits and the player’s digits and tell how many digits matched.arrow_forward11.9: Speakers' Bureau Write a program that keeps track of a speaker's bureau. The program should use a structure to store the following data about a speaker: Name Telephone Number Speaker Topic Fee Required The program should use an array of at least 10 structures. It should let the user enter data into the array, The program should have a menu-driven user interface. Input Validation: When the data for a new speaker is entered, be sure the user enters data for all the fields. No negative amounts should be entered for a speaker's fee.arrow_forwardVISUAL STUDIO C# LANGUAGE 1) Write a program that simulates a lottery. The program should have an array of five integers named winningDigits, with a randomly generated number in the range of 0 through 9 for each element in the array. The program should ask the user to enter five digits and should store them in a second integer array named player. The program must compare the corresponding elements in the two arrays and count how many digits match. For example, the following shows the winningDigits array and the Player array with sample numbers stored in each. There are two matching digits, elements 2 and 4. WinningDigits 7 4 9 1 3 player 4 2 9 7 3 Once the user has entered a set of numbers, the program should display the winning digits and the player’s digits and tell how many digits matched. 2)Write a program that displays the Roman numeral equivalent of any decimal number between 1 and 20 that the user enters. The Roman numerals should be stored in an…arrow_forward
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrProgramming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:Cengage