Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Main {
- static boolean IsDigit(char c)
- {
- int a=(int) c;
- if (a>=48 && a<=57) return true;
- else return false;
- }
- public static void main(String[] args) {
- Scanner in = new Scanner(System.in);
- String a=in.nextLine();
- char b=a.charAt(0);
- if (IsDigit(b)) System.out.println("YES");
- else System.out.println("NO");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement