Question: Im confused about my code i got the wrong output can you please help me fix it import java.util.*; import java.io.*; import java.util.Scanner; public class

Im confused about my code i got the wrong output can you please help me fix it

import java.util.*; import java.io.*; import java.util.Scanner; public class DivideEvenly{ public static void main(String args[]){ Scanner in = new Scanner(System.in); System.out.println("Enter number"); int n = in.nextInt(); System.out.println("Counting by "+n+" up to "+n*100); int i=1; while(i

Im confused about my code i got the wrong output can youplease help me fix it import java.util.*; import java.io.*; import java.util.Scanner; publicclass DivideEvenly{ public static void main(String args[]){ Scanner in = new Scanner(System.in);

SUBMITTED: 12:07 AM ON 03/15/17 1. Compare output Input 1 10 Counting by 1 up to 100 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 50 Your output 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 1 is evenly divisible by 1 2 is evenly divisible by 1 2 3 is evenly divisible by 1 3 4 is evenly divisible by 1 2 4 5 is evenly divisible by 15 Expected output 6 is evenly divisible by 1 2 3 6 7 is evenly divisible by 17 8 is evenly divisible by 1 2 4 8 9 is evenly divisible by 1 39 10 is evenly divisible by 1 2 5 10 Total: 0/10 0/2

Step by Step Solution

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

Students Have Also Explored These Related Databases Questions!