Advertisement
filipparodriguezz

Untitled

Dec 4th, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.39 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Main {
  4.  
  5.     public static void main(String[] args) {
  6.  
  7.         Scanner keyboard = new Scanner(System.in);
  8.  
  9.         int from = 1;
  10.         int to;
  11.  
  12.         System.out.println("Type your number");
  13.         to = keyboard.nextInt();
  14.  
  15.  
  16.         for (int n = from; n <= to; n = n+1 ){
  17.             System.out.println(n);
  18.         }
  19.  
  20.  
  21.  
  22.  
  23.  
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement