Advertisement
IanO-B

Untitled

Dec 4th, 2019
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. import java.util.Scanner;
  2. public class Main {
  3.  
  4. public static void main(String[] args) {
  5. Scanner keyboard = new Scanner(System.in);
  6. System.out.println("Count from: ");
  7. int from = keyboard.nextInt();
  8. System.out.println("To: ");
  9. int to = keyboard.nextInt();
  10. System.out.println("Count by: ");
  11. int by = keyboard.nextInt();
  12. for (int i=from; i<=to; i=i+by){
  13. System.out.println(i + " ");
  14. }
  15.  
  16. }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement