3. Write a simple C++ program that inputs a character from keyboard and display the corresponding ASCII value on the screen.
#include<iostream>
using namespace std;
int main()
{
char c;
cout<< "Enter a character: ";
cin>>c;
cout<< "ASCII value of "<<c<<" is:
"<<(int)c;
}
No comments
Post a Comment