Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.company;
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- Scanner keyboard = new Scanner(System.in);
- System.out.print("Count to: ");
- int num = keyboard.nextInt();
- for (int n = 0; n <= num; n++) {
- System.out.print(n + " ");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement