Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Integer arrays studentGrades and years Registered are read from input. For each element in yearsRegistered, if an element is greater than or equal to

Integer arrays studentGrades and years Registered are read from input. For each element in yearsRegistered, if an element is greater than or equal to 30, output studentGrades corresponding element followed by a space. After the final output, end with a newline Ex: For the input: 97 47 25 98 35 14 29 50 then the output is: 97 90 4 5 -67891911234567 6 19 21 10 18 20 public static void main(String[] args) { Scanner scnr = new Scanner (System.in); } final int NUM VALS = 4; int[] studentGrades new int[NUM_VALS]; int[] yearsRegistered new int [NUM_VALS]; int i; for (i = 0; i < NUM_VALS; ++i) { student Grades [i] = scnr.nextint(); } for (10; 1 < NUM_VALS; ++i) { yearsRegistered [1] scnr.nextInt(); /* Your code goes here */ P

Step by Step Solution

3.41 Rating (145 Votes )

There are 3 Steps involved in it

Step: 1

import javautilScanner public class Main public static void mai... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introductory Financial Accounting for Business

Authors: Thomas Edmonds, Christopher Edmonds

1st edition

1260299449, 978-1260299441

More Books

Students also viewed these Programming questions

Question

a sin(2x) x Let f(x)=2x+1 In(be)

Answered: 1 week ago

Question

Define depreciation. What kind of asset depreciates?

Answered: 1 week ago

Question

Which growth strategy would you say is the most successful?

Answered: 1 week ago