Skip to content

Commit 928d151

Browse files
authored
Java Program - ASCII value of Character
1 parent c8f8915 commit 928d151

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

Test13_ASCII_of_Character.java

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
package com.test.Basic_Java_Programs;
2+
3+
import java.util.Scanner;
4+
5+
public class Test13_ASCII_of_Character
6+
{
7+
public static void main(String[] args)
8+
{
9+
char ch;
10+
11+
System.out.print("Enter any Character : ");
12+
13+
Scanner sc = new Scanner(System.in);
14+
15+
ch = sc.next().charAt(0);
16+
17+
int a = ch;
18+
19+
System.out.println(" ASCII value of " + ch + " is " + a);
20+
21+
}
22+
23+
}
24+
25+
26+
/*
27+
28+
Enter a Character : A
29+
ASCII value of A is 65
30+
31+
32+
33+
*/

0 commit comments

Comments
 (0)