Question: Java program. DON'T use oop and array. a) b) c) Input a positive integer n, then use a do...while loop to print every factor of

 Java program. DON'T use oop and array. a) b) c) Input

Java program. DON'T use oop and array.

a) b) c) Input a positive integer n, then use a do...while loop to print every factor of n from I to n, and calculate the average value of the factors. Use a for loop to print every non-factor of n from n to 1, and calculate the average value of the non-factors Use a nested loop to print a pattem of 10 x 10 square of * with a hollow square in the middle. Refer to the sample ru Format the output appropriately Sample run ter a positive integer: 26 a.) Use do-while loop to print factors of 26 from 1 to 26: 1 2 13 26 Number of factors: 4 Average value of factors: 10.50 b.) Use for loop to print non-factors of 26 from 26 to 1 (10 per line): 25 24 23 22 21 20 19 18 17 16 15 14 12 11 10 9876 5 4 3 Number of non-factors: 22 Average value of non-factors: 14.05 c.) Use nested loop to print the following pattern: 1 12

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!