Test Scores #2
Modify the program of
Trending nowThis is a popular solution!
Chapter 9 Solutions
Starting Out with C++ from Control Structures to Objects (9th Edition)
Additional Engineering Textbook Solutions
Differential Equations: Computing and Modeling (5th Edition), Edwards, Penney & Calvis
Starting Out With Visual Basic (8th Edition)
Web Development and Design Foundations with HTML5 (8th Edition)
Starting Out with Java: From Control Structures through Data Structures (3rd Edition)
Artificial Intelligence: A Modern Approach
Starting Out with Python (4th Edition)
- (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_forward(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(Data processing) A bank’s customer records are to be stored in a file and read into a set of arrays so that a customer’s record can be accessed randomly by account number. Create the file by entering five customer records, with each record consisting of an integer account number (starting with account number 1000), a first name (maximum of 10 characters), a last name (maximum of 15 characters), and a double-precision number for the account balance. After the file is created, write a C++ program that requests a user-input account number and displays the corresponding name and account balance from the file.arrow_forward
- Task 3: Statistics using arrays: by java programming With the spread of COVID 19, the HR department in a company has decided to conduct some statistics among the employees in order to determine the number of infections according to some conditions. For each employee, they have to record the code, name, age, whether he/she was infected or no and the remaining days of leaves for him/her. You are requested to write the program that maintains the lists of details for the employees as mentioned above using the concept of arrays. The program repeats the display of a menu of services until the user decides to exit. 1. Start by initializing the employee details by reading them from the keyboard. 2. Repeat the display of a menu of 4 services, perform the required task according to the user’s choice and asks the user whether he/she wants to repeat or no. You need to choose one service from each category (‘A’,’B’,’C’,’D’) a. A. Display the total number of employees that were infected b. B.…arrow_forwardProgramming Language: C++ Create 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_forwardCreate Array of Random Dates In this task you are required to write a function that will generate a column array (a variable called dates) containing N random dates. N is an integer (whole number) entered by the user and will indicate to the function how many random dates the user requires. The dates array will be structured as follows: • The array shall have two columns; column 1 will contain numbers indicating the day of each month (1-31) and column 2 will contain numbers indicating the month (Jan 1, Feb=2, Mar = 3.... Dec = 12). . Each day must be randomly generated (using the randi() function) taking into account the maximum number of days in each month (i.e. Jan, Mar, May, Jul, Aug. Oct and Dec have 31 days, Apr. Jun, Sep and Nov have 30 days and Feb will have 28 days). You must use an if-elseif-else statement to decide this. • We are assuming no leap years (e. February can only have days between 1-28). For example, the output from calling the function: output = dategen (3) could…arrow_forward
- C++ Program plsarrow_forwardC++ language Write a program that asks a user to input 10 numbers. The numbers are stored in the array if itis not Odd and not already available. After creating the array, it asks the user to enter a numberand deletes it from the array.arrow_forwardPROGRAMMING LANGUAGE: C++ Write a program that accepts up to 20 test-match scores of a batsman in the range of 0 to 100 from the user and stores them in an array. Then main should report how many perfect scores (i.e., scores of 100) and ducks (i.e., scores of 0) were enteredarrow_forward
- CorrectFormation Create a program and locally declare in main fname and Iname and completeName. Ask the user for their first and last name. Put the values into fname and Iname. You will create a function that is called as followed. joinNames( fname, Iname, completeName ); You will pass the first name array, the last name array, and the array that will contain the complete name. The function named joinNames should put the first and last names together in completeName. Make sure that the first and last names begin with capital letters, and that ll others are lower case. Display the final combined name. O X Please enter your first name:chuck wagon Please enter your last name:The complete name is Chuck Wagon Process returned e (@x) execution time : 5.192 5 Press any key to continue.arrow_forwardC++ Visual 2019 Write a program that has an array of at least 100 randomly generated integers. It should call a function that uses the linear search algorithm to locate one of the values. The function should keep a count of the number of comparisons it makes until it finds the value. The program then should call a function that uses the binary search algorithm to locate the same value. it should also keep count of the number of comparisons it makes. Displays these values with an appropriate description.arrow_forward3. Declare and initialize an array with the sequence: 300, 200, 100, 400, 500, and 600. Then,whenever the user provides a number, you will return the index of the array element thatstores that number. If the user enters a number that cannot be found in the array, then theprogram should return -1. The program should run in a loop until the user enters the values1234.arrow_forward
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrC++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage LearningEBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT
- Programming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:CengageProgramming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage Learning