exercise4

This commit is contained in:
2024-10-20 03:08:17 +03:00
parent 87c609de8c
commit 36c0d2e1b1
4 changed files with 61 additions and 0 deletions

View File

@ -0,0 +1,13 @@
import java.util.Scanner;
public class isAlpha{
public static void main(String args[]) {
Scanner scan = new Scanner(System.in);
System.out.println("Enter ALPHA character!");
char value1 = scan.next().charAt(0);
int value2 = value1 - '0';
if (16 < value2 && value2 < 43 || 48 < value2 && value2 < 75)
System.out.println("TRUE!");
}
}
// In this code '0' = 48 so unicode - 48 is the output !!