You are on page 1of 1

#include <iostream.

h>

#include <conio.h>

void main()

clrscr();

char charac;

cout << "Enter the character : " << endl;

cin>>charac;

int num1=charac;

cout << "The ASCII code for " << charac << " is " << num1 << "." << endl;

getch();

You might also like