Advertisement
Guest User

Untitled

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