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 | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
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 Réponses
+ 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