0

How to write a program that asks me to enter an ASCII code value such as 66 and than prints the character having that ASCII code

Question

21st Oct 2018, 6:01 AM
Muhlisa
Muhlisa - avatar
3 odpowiedzi
+ 3
Do like this #include <iostream> using namespace std; int main() { int var=65; cout<<(char)var<<endl; return 0; }
21st Oct 2018, 6:24 AM
MsJ
MsJ - avatar
0
thank you
21st Oct 2018, 6:57 AM
Muhlisa
Muhlisa - avatar
0
In another way: int a; cin>>a; cout<<char(a) ;
16th Oct 2019, 7:19 PM
Sajjad Rezvani
Sajjad Rezvani - avatar