subject

Write a for loop to print all elements in courseGrades, following each element with a space (including the last). Print forwards, then backwards. End each loop with a newline. Ex: If courseGrades = {7, 9, 11, 10}, print: 7 9 11 10
10 11 9 7

Hint: Use two for loops. Second loop starts with i = courseGrades. length - 1. (Notes)

import java. util. Scanner;

public class CourseGradePrinter {
public static void main (String [] args) {
Scanner scnr = new Scanner(System. in);
final int NUM_VALS = 4;
int [] courseGrades = new int[NUM_VALS];
int i;

for (i = 0; i < courseGrades. length; ++i) {
courseGrades[i] = scnr. nextInt();
}
//your solution goes here.

}
}

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 22:30
Which of the following factors would your hypothetical supervisor look at when deciding whether to test a biological material sample for dna? the amount of other evidence you have implicating a suspect in a crime the annual budget for the crime lab both of the above none of the above; you would almost always order a test
Answers: 3
question
Computers and Technology, 23.06.2019 14:00
Select the correct answer. andre was recently hired by an organization to check for system vulnerabilities. he is supposed to exploit these vulnerabilities and create a report on the extent of damage to which the system was susceptible. what position does andre hold in this organization? a. information security analyst b. information assurance manager c. penetration tester d. network security engineer e. chief information security officer
Answers: 2
question
Computers and Technology, 23.06.2019 14:30
Select the correct answer. which step can possibly increase the severity of an incident? a. separating sensitive data from non-sensitive data b. immediately spreading the news about the incident response plan c. installing new hard disks d. increasing access controls
Answers: 2
question
Computers and Technology, 24.06.2019 01:00
Verify each identity[tex] \frac{csc}{cot \: x \: + \: tan \: x} = cos \: x[/tex]
Answers: 1
You know the right answer?
Write a for loop to print all elements in courseGrades, following each element with a space (includi...
Questions
question
Mathematics, 18.05.2021 01:00
question
Mathematics, 18.05.2021 01:00
question
Mathematics, 18.05.2021 01:00
question
Social Studies, 18.05.2021 01:00
Questions on the website: 13722362