Gymnasts Gymnast and Medal: Jaimey Gold Jessica Bronze Georgia Gold Jaden Gold Percentage for Gold: 75% got gold OK Program has two arrays, namely, name and mark array. Array values have been hard- coded. Output must be displayed via a message box that has two message variables, namely, message1, which will have all names within it, and message2, which will show the percentage of gymnasts who won gold (thus accumulation is required as to how many won gold?). int x; string] names ={"Jaimey", "Jess", "Georgia", "Jaden" %3D }; string] medals = { "Gold", "Bronze", "Gold", "Gold" }; ; double totalGold = 0, percGold; %3D string message1 = "Gymnast and Medal: "+ "\n";
Q: Write a program that asks for a password and then verifies that it meets the stated criteria. If it…
A: #include <bits/stdc++.h> using namespace std; void checkpassword(string& password) {…
Q: write the psuedocode and drow the flowchart Create a program to enter grades and calculate averages…
A: In this question it asked to give the pseudocode and draw a flowchart. The question needs to create…
Q: int grades[100]; int i; for (i=0;i <= 100;i++) { grades[i] = 100; The above C++ code is the proper…
A: To do: True or False
Q: JAVA Programming Problem 5 – CharacterArray Write a program which will store the following string…
A: i wll provide two solutions for this question public class CharacterArray {public static void…
Q: Write a flowchart and program that does the following: Stores the ages of six of your friends in an…
A: Flowchart:
Q: 1. Body Mass Index (BMI) is a measure of health on weight. It can be calculated by taking your…
A: Ans : Code: #include <iostream> using namespace std;void readData(int studWeight[], int…
Q: PART C. Write a program, ArrayRange, that asks the user to input integers and that displays the…
A: Programming language is missing in the question. The below program is written in Java programming…
Q: Rainfall Statistics Write a program that uses a two-dimensional array to store the highest and…
A: #include<iostream>using namespace std;const int MONTHS = 12;// prototypes of the functionsvoid…
Q: Write a program that will read in N integers from keyboard input into an array. The size of the…
A: Program: //including essential header file #include <iostream> //using standard namespace…
Q: Question 1 Write a program to prompt the user for eight (8) float values, and store the data in the…
A: Program: #include<stdio.h> /* Function prototype */ float average(float a[100], int n); int…
Q: Summary // Declare a named constant for array size here 8. In this lab, you complete a partially…
A: The complete code is written :
Q: USING CONSTANTS WITH ARRAYS It is a good programming practice to use a named constant to help you…
A: Please find the answer below :
Q: You must use at least two different arrays - These are, in effect, parallel arrays: One for Adult…
A: Actually, program is an executable software that runs on a computer,
Q: // you must finish this program. it should ask how //many fish were caugh by fishermen 1-20,…
A: Complete Code in C++ #include <bits/stdc++.h> // import all libraryusing namespace std;…
Q: Write a program that reads students’ names followed by their test scores. The program should output…
A: The complete code is given below with comments.
Q: Create a flowchart that uses an array that contains valid names for 10 cities in Michigan namely:…
A: Please find below handwriting solution in step 2
Q: The strLetters array is declared using the Dim strLetters() As String = {"E", "A","C", "G"}…
A: ANS: - Option(a) is Correct. The array is first sorted using Sort method, then further the array…
Q: 1. Body Mass Index (BMI) is a measure of health on weight. It can be calculated by Write a program…
A: Implementation in Java- import java.util.*; public class Main { public static void…
Q: C++: Two-dimensional array. which you ask the user to give you a number of rows and the number of…
A: The given problem is related to C++ Programming where the requirement is to read the number of rows…
Q: Ask the user to enter the size of an array. Create an integer array if the given size and fill it…
A: The required C++ code: #include<iostream>#include <stdlib.h>#include<time.h>using…
Q: Nrite a C# console application named MaxMin that a and make sure it is valid (i.e., in between 0 and…
A: In this question, we are asked to write a C# program which calculates the maximum and minimum…
Q: Question Write a program to create an answer sheet to read the student’s answers for a ten (10)…
A: #include<iostream>using namespace std;int main(){ int c=0; string…
Q: array for a maximum 20 numbers, the user will determine the total number to enter from keyboard.…
A: Declare an array of 20 numbers Input n values for each element in array j from 2 to arr[i]…
Q: Should Be in Java: use loops, if statements, arrays, scanner etc Write an application that stores…
A: In the program provided below, 2-d array, if statements, Scanner, etc have been used as asked in the…
Q: rogram Number 1: Password Verifier Imagine you are developing a software package that requires users…
A: if len(pwd)>6: for char in pwd: if char.isupper(): uppflag = False break…
Q: Design a program that lets the user enter the total rainfall for each of the 12 months into an…
A: I have provided code of this in step2.
Q: Display Array values Write a program that lets the user enter ten values into an array. Then pass…
A: Required: Write a program that lets the user enter ten values into an array. Then pass the array,…
Q: 12. Grade Book A teacher has five students who have taken four tests. The teacher uses the following…
A: #include <iostream> using namespace std; int main(){ string sname[5]; // string array…
Q: n visual basic Write the code that will sequentially search through the array strFirstNames and will…
A: logic:- define a strFirstNames array . iterate from i=0 to length-1 of array. use Equals…
Q: USING CONSTANTS WITH ARRAYS It is a good programming practice to use a named constant to help you…
A: Please find the answer below :
Q: You have created and populated a constant array of values in pseudocode as follows: INITIALIZE…
A: Given: INITIALIZE names names(1) = 'Joe' names(2) = 'Mary' names(3) = 'Heather' names(4) =…
Q: Lo Shu Magic Square) The Lo Shu Magic Square is a grid with 3 rows and 3 columns. The Lo Shu Magic…
A: import java.util.*;import java.lang.*;import java.io.*; class LoShuMagicSquare{ public static void…
Q: Code in PHP. RULE: Cannot use array and functions !!! User can show all of the data entered from the…
A: The above functionality can be achieved by storing the first name and last name in a variable and…
Q: 2. Rainfall Statistics Write a program that lets the user enter the total rainfall for each of 12…
A: here we write c++ code: ===========================================================================…
Q: Create a flowchart and c code: You must use at least two different arrays - These are, in effect,…
A: ANS given in step 2 in detail:
Q: Lab 3 Problem Statement Write a program that reads in ten integers and displays the number of…
A: Step 1: Declare class Distinct. Step 2: Declare an integer array arr[] and a field count. Step 3:…
Q: Design a program that asks the user to enter a series of 20 numbers. The program should store the…
A: As per our company guidelines, we are supposed to answer only the first 3 sub-parts 1)
Q: [Question Description] Write a program that reads 10 integers and displays integers which can can be…
A: I have provided C++ CODE along with CODE SCREENSHOT and 2 OUTPUT…
Q: (Pick 5 Lotto) Write a program to simulate a pick-5 lottery game. Your program should generate and…
A: Given: Generate and store 5 distinct numbers between 1 and 9 (inclusive) into an array. The program…
Q: [Problem description] Write a program that first reads an integer for the array size, then reads…
A: Your C++ program is given below as you required with an output.
Q: Lab 3 Problem Statement Write a program that reads in ten integers and displays the number of…
A: Java code contain two method : .1. getUserInput() to take input from user findDistinctNumbers()…
Q: <?php /* NOTE: To see your output in the console, follow your output with a new line "\n" Write…
A: The answer is given below:-
Q: Unfair hurdles are hurdles which are either too high, or way too close together. Create a function…
A: Algorithm - Take input from user. Now use the below logic - let isTooTall = arr.length > 3;…
Q: (c++) 1. Body Mass Index (BMI) is a measure of health on weight. It can be calculated by taking…
A: Hi there, Please find your solution below. I hope you find my solution useful. Thank You!
Q: A teacher has five students who have taken four tests. The teacher uses the following grading scale…
A: Actually, given information is: A teacher has five students who have taken four tests. The teacher…
Q: Jaimey 85* Jessica 62 Georgia 81 Jaden 85* Program has two arrays, namely, name and mark array.…
A: The ask is to display the name and the associated marks on the console window. Additionally it asks…
Q: WRITE C++ PROGRAM Looping and Array Monthly Household Expenses - Create arrays (maximum size 15)…
A: Algorithm: Start Initialize n to 0 Read category name and store it in cat array if it is not blank…
Q: Product Category Program create a program that does the following: > Using different arrays,…
A: C++ used to answer this question
Q: Largest/Smallest Array Values Write a program that lets the user enter 10 values into an array. The…
A: logic:- define getValues function to read user values. use iteration from i=0 to i<n…
Step by step
Solved in 3 steps with 1 images
- (Electrical eng.) Write a program that declares three one-dimensional arrays named volts, current, and resistance. Each array should be declared in main() and be capable of holding 10 double-precision numbers. The numbers to store in current are 10.62, 14.89, 13.21, 16.55, 18.62, 9.47, 6.58, 18.32, 12.15, and 3.98. The numbers to store in resistance are 4, 8.5, 6, 7.35, 9, 15.3, 3, 5.4, 2.9, and 4.8. Your program should pass these three arrays to a function named calc_volts(), which should calculate elements in the volts array as the product of the corresponding elements in the current and resistance arrays (for example ,volts[1]=current[1]resistance[1]). After calc_volts() has passed values to the volts array, the values in the array should be displayed from inside main().(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 VoltsCreate a class Student that contains three members: roll no, name and mark, and threefunctions. Write a first inputStudent() function to get data of student class. Write a secondgetMark() function that returns a student’s mark. Write a third display() function thatdisplays a student’s data. In a main() function, you need to declare 40 students and get dataof all students by using inputStudent() function. And also use a pointer array to keep allstudents by mark greater than 50 and display the searching data of each student in thatpointer array (Use the access operator -> to access a pointer points to member functions ofthe Student class)
- 3."""Code _Write a function validSolution/ValidateSolution/valid_solution()that accepts a 2D array representing a Sudoku board, and returns trueif it is a valid solution, or false otherwise. The cells of the sudokuboard may also contain 0's, which will represent empty cells.Boards containing one or more zeroes are considered to be invalid solutions.The board is always 9 cells by 9 cells, and every cell only contains integersfrom 0 to 9. (More info at: http://en.wikipedia.org/wiki/Sudoku)""" # Using dict/hash-tablefrom collections import defaultdict def valid_solution_hashtable(board): for i in range(len(board)): dict_row = defaultdict(int) dict_col = defaultdict(int) for j in range(len(board[0])): value_row = board[i][j] value_col = board[j][i] if not value_row or value_col == 0: return False if value_row in dict_row: return False else: dict_row[value_row] += 1.C++ Create a class Student that contains three members: roll no, name and mark, and three functions. Write a first inputStudent() function to get data of student class. Write a second getMark() function that returns a student’s mark. Write a third display() function that displays a student’s data. In a main() function, you need to declare 40 students and get data of all students by using inputStudent() function. And also use a pointer array to keep all students by mark greater than 50 and display the searching data of each student in that pointer array (Use the access operator -> to access a pointer points to member functions of the Student class).1) Write a function called initializeArray that receives an array, its size, and two integers andinitializes the array with random values between the first integer and the second integer. Write anotherfunction called printArray that receives an array and its size and prints the array elements in a column. Writea test program that declares and initializes an array of size 20 with random values between 0 and 10 inclusive,and then prints the array using the above functions. 2). Write a function called evenOdd that receives an integer and determines if it is even or odd.Write a test program that initializes an integer array of size 50 with random integers between 1 and 99 inclusive using initializeArray (from question 1) and determines and displays the number of odd or evennumbers in the array using evenOdd.
- in C#, Visual Basic Write an app for Boston Airlines that allows a customer to reserve a seat on the airline’s only plane (capacity: 10 seats). Radio buttons should allow the choice between First Class and Economy. The app should then assign a seat in the first-class section (seats 1–5) or the economy section (seats 6–10). Use a one-dimensional array of type bool to represent the seating chart of the plane. Initialize all the elements of the array to false to indicate that all the seats are empty. As each seat is assigned, set the corresponding element of the array to true to indicate that the seat is no longer available. Your app should never assign a seat that has already been assigned. When the economy section is full, your app should ask the person if it is acceptable to be placed in the first-class section (and vice versa). If yes, make the appropriate seat assignment. If no, display the message “Next flight leaves in 3 hours."Consider the following structure and declarations: struct Player { string firstName; string lastName; int hits; int runs; }; int main() { Player p = { "Jackie", "Robinson", 1518, 947 }; Player team[24]; Player *tPtr = team; team[0] = p; // INSERT CODE HERE } The statement tPtr = *team; will assign the memory address of the first element of team array to tPtr **Notice the star in *team, that way its accurate*** A.) True B.) False1) Write a function called initializeArray that receives an array, its size, and two integers andinitializes the array with random values between the first integer and the second integer. Write anotherfunction called printArray that receives an array and its size and prints the array elements in a column. Writea test program that declares and initializes an array of size 20 with random values between 0 and 10 inclusive,and then prints the array using the above functions. 2)Write a function called shiftRight that receives an array and its size and shifts the elements of thearray to the right while the last element will move to the first location. Write a test program that declares andinitializes an integer array of size 10 with random integers between 1 and 10 using initializeArray (fromquestion 1). Use shiftRight to shift the elements of this array to right and use printArray to print the arraybefore and after shift.Here is a sample run of the program:Original array: [2, 3, 5, 2, 2, 8,…
- Best Houses Company sells houses to their customers and needs a program to facilitate the selling process. Write a JAVA program that asks the user to enter house number (int), house size in square meters (double), and house price (double) and store them in three parallel arrays. The number of houses is 10. Then, the program should ask the user to enter the price range of the required house which is the start price and the last price in the range and should do the following: Print all the information of the houses within that range. Print the number of houses in the specified range.Instead of using parallel arrays, use an array of structs and redo assignment 8as follows:struct candidateType {string name;int numVotes;double percent;};Write a program vote.cc that allows to read from a file vote.in the last names ofthe candidates in an election and the number of votes received by each candidate. Theprogram should then output each candidate’s name, the number of votes received, and thepercentage of the total votes received by the candidate in descending order. Your programshould also output the winner of the election. A sample output is:Candidate Votes Received % of Total VotesJohnson 6000 31.09Brown 5000 25.91Miller 4000 20.73Duffy 2500 12.95Robson 1800 9.33Total 19300The Winner of the Election is JohnsonYour program should have and use at least the following functions:(a) Write a function openFile that prompts a user to enter a file name and opens it.(b) Write a function closeFile that closes an open file.(c) Write a function getData that reads from the file the…JAVA PROGRAM: Monkey Business A local zoo wants to keep track of how many pounds of food each of its three monkeys eats each day during a typical week. Write a program that stores this information in a two-dimensional 3 × 5 array, where each row represents a different monkey and each column represents a different day of the week. The program should first have the user input the data for each monkey, or use constant values rather than asking user for input. Then it should create a report that includes the following information: Display 3X5 array first. Average amount of food eaten per day by the whole family of The least amount of food eaten during the week by any one The greatest amount of food eaten during the week by any one Input Validation: Do not accept negative numbers for pounds of food eaten.