Question: Give proper answers in java code plz Homework: Iteration 1. (This is from Review Exercise R4.1 at the end of Chapter 4 of Jaw for


Give proper answers in java code plz
Homework: Iteration 1. (This is from Review Exercise R4.1 at the end of Chapter 4 of Jaw for Everyone.) Assume variables simplewriter out and int n are already declared in each case. Write a separate while loop for each of the following tasks: a. Print all squares less than n. For example, if n is 100, print 0 1 4 9 16 25 36 49 64 81. b. Print all positive numbers that are divisible by 10 and less than n. For example, if n is 100), print 10 20 30 40 50 60 70 80 90, c. Print all powers of two less than n. For example, if n is 100, print 1 2 4 8 16 32 64. 2. (The first four of these are frumri Review Exercise R43 at the end of Chapter 4 of Java for Everyone). Using the kind of tracing tables discussed in Writing and Tracing Lixips, provide tracing tables for these loops: int i - 0, j - 10,1 - 0; while (i 0) ( i--; j++; nanti -); 6 d. int i = 0, ) - 10, r = 0; while (i != 1) { i = i + 2; j - i - 2; ++; 5 e. int i = 3, j = 1, n-3; while (i !- 0) ( n-ji i--; 3. (This is from Review Exercise R4.15 at the end of Chapter 4 of Java for Everyone.) Rewrite the following for loop into a while loop- int s = 0; for (int i = 1; i
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
