Java Lab 8
Java Lab 8
Create a new Java file (empty Java file), save it to your H: drive, call it lab8
Insert the following code to set up your program:
import java.util.Scanner;
100pt:
Hints:
A factor is a number that evenly divides into another (for instance, the factors of 10 are 1, 2, 5, 10). In
other words, factors are numbers that you can multiply together to get another.
Remember modulus (%) that returns the remainder of a division (i.e. 12 % 5 == 2)
Example program:
>> Please enter a number to discover the largest and smallest factors of:
>>> 24
For example:
int i = 1;
System.out.println(i);
i++;