Professional Documents
Culture Documents
Description
Get an input character from the user and the give the ASCII value of the given input as the output.
Input
Output
98
Input
Output
66
C Program
#include <stdio.h>
int main()
char c;
scanf("%c",&c);
return 0;
}
Talent Battle 100 Days Coding Series
C++ Program
#include <iostream>
int main()
char c;
cin>>c;
return 0;
Java Program
import java.util.Scanner;
char c=sc.next().charAt(0);
int i = c;
}
Talent Battle 100 Days Coding Series
Python
value = ord(c)