Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package myApp;
- import java.util.Scanner;
- public class class03_01 {
- public static void main(String[] args) {
- //init vars
- int n = 0;
- //usage msg
- System.out.println("Integer: ");
- //open in_Stream, parse & close
- Scanner s = new Scanner(System.in);
- n = s.nextInt();
- s.close();
- //output n , n^2
- System.out.printf("%d , %d", n, n*n);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment