+ 1

How to create a C++ program to input a character and print out value using static_cast?

Write a program inputs a character (char). Then using a type conversion (static_cast) print out the integer value of the letter. What happens if you add 1 to a character variable? Print out the results. ABOVE is the direct instructions of what i am working on. What is confusing me is, if I make a program to input a character what exactly am i doing? please help if you can. Below is what I have written thus far. int main() { char a; char letter = 'a'; cout << "Please enter a character: "; cin >> a; letter = letter; cout << "output" <<endl; }

20th May 2018, 8:18 PM
shamizzle
2 odpowiedzi
+ 5
hold on I will make a quick code.
20th May 2018, 8:31 PM
Manual
Manual - avatar
+ 5
Here you are copy it (by typing) and make your own code. https://code.sololearn.com/cYT7FqkhF5zv/?ref=app
20th May 2018, 8:36 PM
Manual
Manual - avatar