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 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
Get step-by-step solutions from verified subject matter experts
Document Format (2 attachments)
6364e714b3a1f_239848.pdf
180 KBs PDF File
6364e714b3a1f_239848.docx
120 KBs Word File
