Question: I don't know what is the error is. Please help. LAB ACTIVITY 4.15.1: LAB: Hailstone sequence 0/10 LabProgram.java Load default template... 9 int n; 10

 I don't know what is the error is. Please help. LABACTIVITY 4.15.1: LAB: Hailstone sequence 0/10 LabProgram.java Load default template... 9 int

I don't know what is the error is. Please help.

LAB ACTIVITY 4.15.1: LAB: Hailstone sequence 0/10 LabProgram.java Load default template... 9 int n; 10 int nCount = @; 11 12 n = scnr.nextInt(); 13 14 while(n>1) 15 { 16 System.out.print(n + "\t" ); 17 18 if(n%2 == 0) 19 { 20 n = n/2; 21 ) 22 23 else if(n % 2 != 0) 24 { 25 n = n*3 + 1; 26) 27 28 if (nCount % 10 == 0) 29 { 30 System out print(""). Develop mode Submit mode When done developing your program, press the Submit for grading button below. This will submit your program for auto-grading. 25 19 58 29 Your output 44 22 76 38 19 58 29 88 44 11 22 5 17 52 13 40 20 10 16 Expected output 26 12 4 2 2: Compare output A 0/2 Output is nearly correct; but whitespace differs. See highlights below. Special character legend Input 1 Your output Expected output 1 3: Compare output 0/2 Output is nearly correct; but whitespace differs. See highlights below. Special character legend Input 512 256 128 64 32 16 8 4 2 Your output 2 256 128 64 32 16 8 4 2 14 Expected output 4: Compare output 0/2 Output is nearly correct; but whitespace differs. See highlights below. Special character legend Input 1024

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!