Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Bounds {
- public static void main(String[] args) {
- Scanner in = new Scanner(System.in);
- System.out.print("Enter Starting number:");
- int starting_number = in.nextInt();
- System.out.print("Enter Starting number:");
- int upper_bound = in.nextInt();
- System.out.print("Enter Step Size:");
- int step_size = in.nextInt();
- int num = starting_number, count = 0;
- while (num < upper_bound) {
- System.out.print(num + "");
- count++;
- if (count% 10 == 0)
- System.out.println();
- num+=step_size;
- }
- System.out.println();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement