I hope you might be able to help me. My instructor gave us a problem and I have no idea how to really get started. The instructor told us he didn't really know how to do it so I hope you can help me. The problem is to write a simple job to write out a function that calls the Ascii code. It has to print ou the Ascii code upper and lower case letters. I hope you can help me thank you for your time. I use a C++ Compiler.
I have provided the program below.I have used type conversion to obtain ASCII code.When you conver char to int, you getascii code. My variable ascii is int. Variables alphabet and up_alphabet are char. When I san ascii=alphabet or ascii=up_alphabet, ascii receives the ASCII value.
I have put all this in a loop.
When I say alphabet++, it changes to the next alphabet.(if it was 'd' before, it becomes 'e' and so on).
Since all 26 cannot come on one page, I have displayed 13 and 13.
cout<<alphabet<<" : "<<ascii<<" ";
cout<<up_alphabet<<" : "<<ascii;
cout<<"\n\nPress any key to view other 13 codes";