Computer Science, asked by saralaBaria, 1 year ago

C++ PROGRAM TO PRINT ASCII CODE FOR A GIVEN DIGIT

Answers

Answered by Likun45
3
#include <iostream>using namespace std;
int main(){ char x; int numeric; cout << "Give character: "; cin >> x; cout << "Its ascii value is: " << (int) x << endl; cout << "Give a number to convert to ascii: "; cin >> numeric; cout << "The ascii value of " << numeric << " is " << (char) numeric; return 0;}
Attachments:

Likun45: It is a cpp file u can open it in dev ++ ide,notepad ,visual c++,turbo c++ etc
Similar questions