Write a program that declares an array of size 10.Read 10 integer from user and store them in the array then prints them out in reverse order.
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: 1. Write a program to produce an array of integer random numbers. Your program should find out from…
A: As per our company guidelines, we are supposed to answer only one question per post and kindly…
Q: A positive integer greater than 1 is said to be prime if it has no divisors other than 1 and itself.…
A: Here, Code instruction is given.
Q: return (2) when input number is even 5/7
A: Required: Note: we are only allowed to solve one question in one post. to get answers to others,…
Q: Write a Java application for a grade book using arrays: Create an array to store 20 test grades,…
A: Code: import java.util.Random;//GradeBook.javapublic class GradeBook { //function to calculate…
Q: Write a program that prompts the user to enter an integer value in an array, and user can also print…
A: I give the code in Java along with output and code screenshot
Q: rite a program, which creates an array of 5 elements of type integer. Print the elements of the…
A: Summary: In this question, we have to initialize an array of 5 elements and then take the input from…
Q: Take an array of size 10 from user and display the message “This is in array” if a number given by…
A: Given: Take an array of size 10 from user and display the message “This is in array” if a number…
Q: Write a program that allows the user to enter name and grade until “QUIT" is entered for name. The…
A: Please find the answer below :
Q: 2. A store owner wants the total sales for 2020. Write a program that will load an array with 12…
A: #include <iostream> #include<iomanip> using namespace std; int main() { int…
Q: Write a program that uses a 2-D array to store the highest and lowest temperatures for each month of…
A: The answer is given below:-
Q: The grid contains the numbers 1 – 9 exactly The sum of each row, each column and each diagonal all…
A: Dear Student, The source code, implementation and expected output of your program is given below -
Q: Create a program that asks the user to type in 10 words one by one. The program should store each…
A: Required: Required code with comments for explanation and screenshot of both code and output has…
Q: Write a program that reads 7 integers and store them in an array of size 7. Your program should find…
A: Read Integers: The program starts by reading 7 integers from the user using a loop and stores them…
Q: Write a program named as reverse.c that reads a message, then prints the reversal of the message.…
A: The C code is given below with output screenshot
Q: You are give an array which contains the following integers : 9, 10, 12, 15, 7, 2, 1, 16, 18, 5, 6.…
A: class comp{ static int prodt(int arr[], int num) { int r = 1; for (int i = 0; i…
Q: ava Program - Functions with 2D Arrays Write a function named displayElements that takes a…
A: The JAVA Code is given below with output screenshot
Q: The Sports Department of an education institution collects students' names participating in various…
A: Java program to solve the given problem is given below.
Q: Write a program to simulate a pick-5 lottery game. Your pro-gram should generate and store 5…
A: code in c- #include <stdio.h>#include <stdlib.h>…
Q: RetailItem Class Write a class named RetailItem that holds data about an item in a retail store. The…
A: both questions answers are given below:
Q: Write a program to store an array of integer random numbers. Program should find out from the user…
A: CODE:- import java.util.Random;import java.util.*;public class Main {public static void…
Q: Write a program that asks the user to input the sales of 10 salesperson and store them in an array.…
A: Array, which stores a fixed-size sequential collection of elements of the same type. An array is…
Q: Write the followingmethod that tests whether a two-dimensional array has four consecutive numbersof…
A: Program: A Java program that satisfies the given criteria is as follows, File name: “Sample.java”…
Q: Write a program that reads student scores into an array, gets the best score, and then assigns…
A: Start the program.Asking the user to provide the total number of pupils is recommended.Read and…
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: Wtite a java program that will accept 10 numbers and save it on array. After you input the 10…
A: Define module java.util.Scanner for input operation. Define main class. Define main function. Define…
Q: Write an application that prompts the user to enter nine integers and then store those nine integers…
A: As given, we need to write a Java program that prompts the user to enter nine integers and then…
Q: The Lo Shu Magic Square is a grid with 3 rows and 3 columns shown below. The Lo Shu…
A: #include<iostream>#include <algorithm>using namespace std;// Global constantsconst int…
Write a
Step by step
Solved in 3 steps with 1 images
- Write a program that prompts the user to enter an integer value in an array, and user can also print out some values.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.EX15: write a program that return (1) when input number odd return (2) when input number is even 5/7 EX16: write a program that separate the content of a input array (a) into two arrays; (x) : contain the 6/7 numbers with odd index and other array (y) contain numbers with even index . EX17:let you have array A[20], write a program that read the array and swap the content of odd index with 7/7 the content of even index .
- Write a program to store an array of integer random numbers. Program should find out from the user how many numbers to store. It should then generate and store that many random integers (the random numbers must be between 1 and 999 inclusive). The program should then determine the smallest number, the largest number, and the average of all the numbers stored in the array. Finally, it should print out all the numbers on the screen, five numbers to a line with spaces in between. Once the contents of the array have been printed to screen, display the smallest number, largest number, and average determined previously ensuring that the program design in modular. Explain whether the static variables and methods can can be used and why. The Random class of Java library (java.util.Random) implements a random number generator. To generate random numbers, construct an object of q the class Random, and then use the method nextInt(n) which returns a number between 0 (inclusive) and n (exclusive).…Write a program that reads student scores into an array, gets the best score, and then assigns grades based on the following scheme: • Grade is A if score is • Grade is B if score is • Grade is C if score is • Grade is D if score is • Grade is F otherwise. best - 10 best - 20; best - 30; best - 40; The program prompts the user to enter the total number of students, then prompts the user to enter all of the scores, and concludes by displaying the gradesThe Lo Shu Magic Square is a grid with 3 rows and 3 columns shown below. The Lo Shu Magic Square has the following properties: The grid contains the numbers 1 – 9 exactly The sum of each row, each column and each diagonal all add up to the same number. This is shown below: Write a program that simulates a magic square using 3 one dimensional parallel arrays of integer type. Do not use two-dimensional array. Each one the arrays corresponds to a row of the magic square. The program asks the user to enter the values of the magic square row by row and informs the user if the grid is a magic square or not. Project Specifications Input for this project: Values of the grid (row by row) Output for this project: Whether or not the grid is magic square Processing Requirements Use the following template to start your project: #include<iostream> using namespace std; // Global constants const int ROWS = 3; // The number of rows in the array const int COLS = 3; // The number of columns…
- The Lo Shu Magic Square is a grid with 3 rows and 3 columns shown below. The Lo Shu Magic Square has the following properties: The grid contains the numbers 1 – 9 exactly The sum of each row, each column and each diagonal all add up to the same number. This is shown below: Write a program that simulates a magic square using 3 one dimensional parallel arrays of integer type. Do not use two-dimensional array. Each one the arrays corresponds to a row of the magic square. The program asks the user to enter the values of the magic square row by row and informs the user if the grid is a magic square or not. Processing Requirements - c++ Use the following template to start your project: #include<iostream> using namespace std; // Global constants const int ROWS = 3; // The number of rows in the array const int COLS = 3; // The number of columns in the array const int MIN = 1; // The value of the smallest number const int MAX = 9; // The value of the largest number //…The Sports Department of an education institution collects students' names participating in various teams like cricket, football, hockey. A student is allowed to participate in only ONE team. Write a Java program that prompts the user to input names for the three teams and checks NO identical names are found in the arrays. i.e., while entering name for the second team, it should not appear in the first team and while entering name for the third team, it should not appear in first and second team.Write a program that reads 7 integers and store them in an array of size 7. Your program should find and display the average of all the odd numbers of the array and display all numbers greater than the average of odd numbers.
- Write a Java application for a grade book using arrays: Create an array to store 20 test grades, random numbers between 0-100, inclusive. Print these 20 grades Calculate and print the average grade Calculate and print the highest and lowest gradesCreate a program that asks the user to type in 10 words one by one. The program should store each word in an array. The program should then go through the array of words one by one and it should upper case all the odd index words, and lowercase all the even index words. (Consider zero is even). Then the program should go through the array and print off the entire "sentence" word by word onto a single line, adding a period to the end. Then print off the list as an array using the Arrays.toString() command A sample output might look like. Please type in word #1 : Alpha Please type in word #2 : bravo Please type in word #3 : charlie Please type in word #4 : delta Please type in word #5 : echo Please type in word #6 : foxtrot Please type in word #7 : golf Please type in word #8 : hotel Please type in word #9 : india Please type in word #10 : juliet Your sentence is: alpha BRAVO charlie DELTA echo FOXTROT golf HOTEL india JULIET. As a string it would look like: [alpha,BRAVO, charlie, DELTA,…Please solve it by java