This program accepts 10 random names. It must use a single array to store the names; there will be one array to store all 10 names. 1. Using a loop of your choosing, prompt the user as shown, one name at a time, and store each name in the array. 2. Finally, loop through the array to print each stored name.
Q: Write a program named FullName2.sce that prompts the user for an array of x data and an array of y…
A: given data, enter x data : [1, 2, 3, 4] enter y data : [2, 5, 9, 10]
Q: Write a program that displays the contents of a file in four columns titled “Item Name”, “Num of…
A: A C++ program is as follows, #include <iostream> #include <fstream> #include…
Q: you are required to write a program that takes inout from the user the marks of programming…
A: Since you are not mentioning the programming language, here we are using C++ to complete the…
Q: You have been hired by the Department of Computer Science at Wayne State University to write a C++…
A: #include <iostream> //header file using namespace std;//Function to find count of grade A-int…
Q: For this assignment you will be working with arrays and File I/O. Open a new Java file called…
A: Step 1 : Start Step 2 : Take user input of the file name from the user. Step 3 : Open the file using…
Q: (Intro to Java) Tracking Customers This program will read in a series of names, along with an…
A: Coded using Java.
Q: Problem: Write a program that prompts the user to enter 10 names, each with maximum of 30…
A: GIVEN CODE: //Start of program #include <iostream>//Line 1// #include <cstring>//Line…
Q: a. Create a function that will count the number of even numbers contained in the array that is…
A:
Q: Write a program that uses 3 command line arguments to search a list of float numbers in a file and…
A: Step 1 : Start Step 2 : Create a method SearchFile which takes the file name and the float value to…
Q: Write the pseudocode for an application that will: a. Prompt a user for three numbers. b. Store the…
A: Pseudocode is the procedure to solve a problem step by step approach. Each step is instruction and…
Q: hello! i can't get the right output, it says "EOFERROR: EOF when reading a line" Instructions:…
A: You can't compare string with a character . Your out will not gets printed if you want to print…
Q: Write a program to create a one dimensional array called Mixed and another one dimensional array…
A: The above program is written in python since you didn't mention the language.
Q: 1-Write a program that meets the following requirements: Creates an array with 100 randomly chosen…
A: Given: Write a program that meets the following requirements: Creates an array with 100 randomly…
Q: Write a Java program named searchForLastOccurence that : • Asks the user to enter an integer value…
A: import java.util.*; public class Main{ public static int lastIndexOf(int[] a, int v) { for…
Q: #pragma once class Student { public: Student(); double calculateAverage(); private: double…
A: Note- As you have asked for implementing calculateAverage() method only and you did not provide…
Q: 3. Write a program that reads (up to 100) temperature values from a file called input.txt. Read the…
A: Given:
Q: Create a class called Task2.java. Besides the main method, you need to write a method called…
A: public class Task{ public static void switchValues(int arr1[], int arr2[]) { // switch…
Q: A .The following JavaScript command adds a method to a built-in class that can be called on any…
A: Here's the solution:
Q: Allow a user to enter any number of double values up to 15. The user should enter 99999 to quit…
A: import java.util.*;import java.lang.*; public class DistanceFromAverage { public static void…
Q: Add a main function which takes any number (including 0) of command line arguments. It creates a new…
A: i give this question answer in next step,
Q: nput to a function fillEmployee(int eNum). Make sure, employee number, must be 4 digit unique number…
A: There are total 50 employees working in XYZ organization who have a policy of Bonus via lucky draw.…
Q: This program asks the user to enter 4 names for a team, storing them in an array of Strings.
A: 1. Create function input Team with parameter int array size. i. create array of string of…
Q: Write a program named ArrayDemo that stores an array of 10 integers. (Note that the array is created…
A: 1. declare variable option, start, end; 2. run infinite while loop 1. prompt the user 2. get…
Q: In the previous activity, you used a loop to count how many negative numbers an array contained. Use…
A: Following is the code loop we want to implement in order to get numbers between lower and upper…
Q: (Game: ATM machine) Use the Account class created in Programming Exercise 9.7 to simulate an ATM…
A: Program code: import java.io.*; import java.util.Scanner; public class account { /** * @param args…
Q: In a file contains the line "very good boy\r\n" then on reading this line into the array str using…
A: I have answered the question in step 2.
Q: In this assignment you will write a program to find the mean of a list of grades stored in a file.…
A: We have to create a program which reads the data of the text file named "john_smith_grades.txt" and…
Q: Modify the program below, by adding an option 'f' to your menu program. If this option is chosen,…
A: NOTE: - The only case 'f' is introduced in the main function and a static method named…
Q: Create a program named student1.java that will use arrays to store student names and grades assume…
A: Given :- Create a program named student1.java that will use arrays to store student names and grades…
Q: Write a program called GradesAverage, which prompts user for the number of students, reads it from…
A: CODE:- //PROGRAM NAME = GradesAverage#include<iostream>using namespace std;int main(){int…
Q: . int16_t returnMin(int16_t x[], uint32_t count); // return the minimum value from the integer…
A: This Question belongs to assembly language domain of computer science. To solve:-. int16_t…
Q: For some reason I have 2 programs that aren't running. This is the second one, please let me know if…
A: This sort of import proclamation is vital. They tell the arrange of which sort of Scanner you are…
Q: Create a program that allows you to create a fantasy football roster based on the existing list of…
A: Given: Create a program that allows you to create a fantasy football roster based on the existing…
Q: ODE SHOULD BE IN JAVA WITH ARRAYS AND LOOPS AND STUFFS!! Write an application that allows a user to…
A: Write an application that allows a user to enter the names and birthdates of up to 10 friends.…
Q: Write the pseudocode for an application that will: a. Prompt a user for three numbers. b. Store the…
A: START BEGIN DECLARE an array “arrVal” with size “3”, choice, searchValue, sum=0 PROMPT the user to…
Q: Create a console application YourLastNameAlP3SC and use a one-dimensional array to solve the…
A: 1. program1 /******************************************************************************…
Q: You must write a small application in JAVA that stores SRC candidate names and the votes they…
A: We will solve this problem in Java language.
Q: 6. Write a program that reads (up to 100) temperature values from a file called input.txt. Read the…
A: Write a program that reads (up to 100) temperature values from a file called input.txt. Read the…
Q: Write a program called GradesAverage, which prompts user for the number of students, reads it from…
A: Required: Using INTELLIJ IDEA COMMUNITY.
Q: Q4. Write a program that creates an array of 100 random integers in the range 1 to 200 and then…
A: Program to store hundred random numbers into array and then search using sequential search. Program…
Q: Write an application that contains an array of 10 multiple-choice quiz questions related to your…
A: There are the following errors in the given code: The array of string questions has not been…
Q: 3. Write a program that reads (up to 100) temperature values from a file called input.txt. Read the…
A: Note: Answering the question in python as no language is mentioned. Input : Read the data from…
Q: Write an application in which you declare an array of eight first names. Write a try block in which…
A: import java.util.*; public class BadSubscriptCaught{ public static void main(String[] args) {…
Q: can you please write this in java.util.scanner form and can you make it so i can copy and past it,…
A: The UML Class for the given functionality is as below:
Q: Create a LookupNames project. In the main function: Ask the user to enter a number of names, X to…
A: Approach: Import the header file and use the namespace. Define the function displayNames to…
Q: Write a program that can be used to assign seats for a commercial airplane. The airplane has 13…
A: Using C++ Language
Q: Write a program that creates array of 10 integers. Ask the user to enter the data in the array. Each…
A: //note: since programming language is not mentioned we are providing answer in cpp #include…
Q: c++ write a hangman game that randomly generates a word and prompts the user to guess one letter at…
A: #include <iostream> #include <fstream> #include <cmath> using namespace std; int…
Q: Create a Console application that does the following: This program accepts 10 random names. It must…
A: Here I written C# Code in Console application below. I hope you like it.
Create a Console application that does the following:
This program accepts 10 random names. It must use a single array to store the names; there will be one
array to store all 10 names.
1. Using a loop of your choosing, prompt the user as shown, one name at a time, and store each
name in the array.
2. Finally, loop through the array to print each stored name.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
- Create a Console application that does the following:This program accepts 10 random names. It must use a single array to store the names; there will be onearray to store all 10 names.1. Using a loop of your choosing, prompt the user as shown, one name at a time, and store eachname in the array.2. Finally, loop through the array in reverse order to print the stored names in reverse orderWrite an application that displays a series of at least five student ID numbers (that you have stored in an array) and asks the user to enter a numeric test score for the student. Create a ScoreException class, and throw a ScoreException for the class if the user does not enter a valid score (less than or equal to 100). Catch the ScoreException and then display an appropriate message. In addition, store a 0 for the student’s score. At the end of the application, display all the student IDs and scores. Save the files as ScoreException.java and TestScore.java.This program asks the user to enter 4 names for a team,storing them in an array of Strings.Then the program asks for one of those names again,and a new name to substitute instead of that one.Finally, the program changes the array, making thatsubstitution. This modified list of names is printed on the screen. You can see sample output at the end of this file. The main method has been written for you below.DO NOT CHANGE THE MAIN METHOD.PLEASE WRITE THE FOLLOWING 3 FUNCTIONS THAT ARE NEEDED TO COMPLETE THE PROGRAM:1) inputTeam: Input and return an array of Strings, with the specified number of elements (one int parameter).2) substitute: Has 3 parameters: an array of Strings, and two String names. Changes the array by replacing theelement containing the nameToRemove with the nameToAdd.3) outputArray: Has 1 parameter: an array of Strings.Outputs all the array elements, separated by spaces. import java.util.Scanner; class Main{ static Scanner keyIn = new Scanner(System.in); public…
- Write a program to create a one dimensional array called Mixed and another one dimensional array called Prime. Both arrays are of size 30 and will be used to store integer numbers. The program will loop on the below menu until the user decides to exit. Implement each option of the below menu by writing the appropriate user defined function. 1- Fill the array Mixed with random integer numbers between 10 and 90. 2- Read the array Mixed and copy all prime numbers to the array Prime. 3- Print the content of both arrays. 4- Find and return the sum of even numbers in the array Mixed. 5- ExitWrite the pseudocode for an application that will:a. Prompt a user for three numbers.b. Store the values entered by a user in an array as they are provided bythe user.c. Ask a user if they would like to search for a value:i. If the user wishes to search for a value, the user needs to beprompted for a value to search for. If the value is found, anotification needs to be provided to the user.d. Use a for loop to cycle through the arrays in order to calculate anddisplay the total of the values stored in the array. JavascriptAllow a user to enter any number of double values up to 15. The user should enter 99999 to quit entering numbers. Display an error message if the user quits without entering any numbers; otherwise, display each entered value and its distance from the average. Save the file as DistanceFromAverage.java. Now, modify that program to first prompt the user to enter an integer that represents the array size. Java generates a NumberFormatException if you attempt to enter a noninteger value using nextInt(); handle this exception by displaying an appropriate error message. Create an array using the integer entered as the size. Java generates a NegativeArraySizeException if you attempt to create an array with a negative size; handle this exception by setting the array size to a default value of five. If the array is created successfully, use exception-handling techniques to ensure that each entered array value is a double before the program calculates each element’s distance from the average.…
- Write a program that simulates rolling two dice. Prompt the user to enter the number of dice rolls. Use a loop to repeatedly call a method that simulates a dice roll and returns the total of the two dice to main. Keep track of the rolls in an array in main, and end the program by showing the results of the rolls.Write a program called GradesAverage, which prompts user for the number of students, reads it from the keyboard, and saves it in an int variable called numStudents. It then prompts user for the grades of each of the students and saves them in an int array called grades. Your program shall check that the grade is between 0 and 100. A sample session is as follow: Enter the number of students: 3 Enter the grade for student 1: 55 Enter the grade for student 2: 108 Invalid grade, try again... Enter the grade for student 2: 56 Enter the grade for student 3: 57 The average is 56.0Case Problems - 1- In Chapter 8, you modified the EventDemo program for Carly’s Catering to accept and display data for an array of three Event objects. Now, modify the program to use an array of eight Event objects. Prompt the user to choose an option to sort Events in ascending order by event number, number of guests, or event type. Display the sorted list, and continue to prompt the user for sorting options until the user enters a sentinel value. Save the file as EventDemo.java.
- This program asks the user to enter 4 names for a team,storing them in an array of Strings.Then the program changes the array, replacing the firstteam member with Craig. Then this modified list ofnames is printed on the screen. You can see sampleoutput at the end of this file. 1) inputTeam: Input and return an array of Strings,with the specified number of elements (one int parameter).2) substitute: Has 3 parameters: an array of Strings,and two String names. Changes the array by replacing theelement containing the nameToRemove with the nameToAdd.3) outputArray: Has 1 parameter: an array of Strings.Outputs all the array elements, separated by spaces. import java.util.Scanner; class Main{ public static void main(String[] args) { String[] team; String nameToRemove, nameToAdd; System.out.println("Please enter 4 names for this team:"); team = inputTeam(4); nameToRemove = team[0]; nameToAdd = "Craig"; System.out.println("Sorry, we need to replace " + nameToRemove…Modify the program below, by adding an option 'f' to your menuprogram. If this option is chosen, the program should ask the user to enter 10integers. The program should store each integer into an array (as each one isentered). Once the array contains the 10 integers, the program should output:- The sum of the 10 numbers entered- The average of the 10 numbers entered- The highest number entered- The lowest number entered import java.util.*; public class Code {static Scanner scan = new Scanner(System.in);public static int bigger(int x, int y, int z) {int large = x;if(x >= y && x >= z)large = x;else if(y>=x && y >=z)large = y;elselarge = z;return large; }public static int smaller(int x, int y, int z) {int small = x;if(x <= y && x <= z)small = x;else if(y<=x && y <=z)small = y;elsesmall = z;return small; }public static void bigSmall() {System.out.print("Enter three numbers: ");int x = scan.nextInt();int y = scan.nextInt();int z =…Computer Science Write a program that uses 3 command line arguments to search a list of float numbers in a file and prints out the result of whether the number was found or not on the console. Also, it prints the array in the reverse order (not sorted but reverse order of how the numbers were read in). The first argument is the name of the input file which has the numbers to be searched, the second is an integer specifying how many numbers are in the input file and the third argument is the float number being searched for. Use dynamic memory allocation for the array and use a function (that returns a boolean value) to do the searching. Also make sure in the beginning of your program, that the program will execute only if exactly three arguments (other than executable name itself) are specified. at the command line.