Declare an array of 10 integers and initialize its elements


Question 1: Declare an array of 10 integers and initialize its elements to the following values: -10; -8; -6; -4; -2; 0; 2; 4; 6;8;10

Question 2: Rewrite the following loops without using the "for each" (enhanced for loop) construct. Here, values have the type double.
(a) for (double element : values) sum = sum + element;
(b) for (double element : values) if (element == target) return true;

Question 3: Write a Java program that asks the user to input the scores of 10 students. The scores entered must be stored in an array.The program must determine:
(a) The lowest score
(b) The highest score
(c) The average score.

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: Declare an array of 10 integers and initialize its elements
Reference No:- TGS0981381

Expected delivery within 24 Hours