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 08:30
Linda subscribes to a cloud service. the service provider hosts the cloud infrastructure and delivers computing resources over the internet.what cloud model is linda using
Answers: 1
question
Computers and Technology, 22.06.2019 19:30
When creating a presentation in libre office impress, where does the editing of slides take place? a. the slides panel b. the center panel c. the tasks panel, under the masters pages tab d. the tasks panel, under the layouts tab
Answers: 1
question
Computers and Technology, 22.06.2019 22:00
During physical science class ben and jerry connected three identical lightbulbs in parallel to a battery where happens when ben removes one of the lightbulbs from it’s socket
Answers: 2
question
Computers and Technology, 23.06.2019 02:00
In the context of an internet connection, llc stands for leased line connection liability limited company local loop complex local loop carrier
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.09.2020 02:01
question
Mathematics, 18.09.2020 02:01
question
Mathematics, 18.09.2020 02:01
question
Mathematics, 18.09.2020 02:01
question
English, 18.09.2020 02:01
question
Mathematics, 18.09.2020 02:01
question
Biology, 18.09.2020 02:01
question
Mathematics, 18.09.2020 02:01
question
Mathematics, 18.09.2020 02:01
question
Mathematics, 18.09.2020 02:01
question
Spanish, 18.09.2020 02:01
question
Mathematics, 18.09.2020 02:01
question
Mathematics, 18.09.2020 02:01
question
Geography, 18.09.2020 02:01
question
Mathematics, 18.09.2020 02:01
question
Mathematics, 18.09.2020 02:01
question
Mathematics, 18.09.2020 02:01
question
Social Studies, 18.09.2020 02:01
question
Mathematics, 18.09.2020 02:01
question
Mathematics, 18.09.2020 02:01
Questions on the website: 13722363