Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class MultiplesLoopRange {
- public static void main( String[] args ) {
- int start = Integer.parseInt (args [0]);
- int end = Integer.parseInt (args [1]);
- int factor = Integer.parseInt (args [2]);
- for (int x = start; x <= end; x++) {
- if (x % factor == 0) {
- System.out.print (x + " ");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment