Question: Which line of statement 3 points should be changed in the below code to display numbers divisible by 10? * 1. for (int i

Which line of statement 3 points should be changed in the below

Which line of statement 3 points should be changed in the below code to display numbers divisible by 10? * 1. for (int i = 0; i < n; i++) { %3D 2. int number = input.nextInt (); 3. if (number % 3 == 0) 4. System.out.println (number); 5. } Line 1 should be: for ( int i = 0; i < n; i += 3 ) Line 3 should be: if ( number % 10 == 0) Line 3 should be: if ( number % 10 != 0) All the above None of the above

Step by Step Solution

3.50 Rating (157 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Document Format (2 attachments)

PDF file Icon

6364e714b3a1f_239848.pdf

180 KBs PDF File

Word file Icon

6364e714b3a1f_239848.docx

120 KBs Word File

Students Have Also Explored These Related Programming Questions!