C++ Program that accepts a character between a to j and prints next 4 characters

#include
#include
int main()
{
clrscr();
char ch;
cout<<“\n\t Enter a Character between A and V:”;
cin>>ch;
int num=ch;
cout<<“\n\t Next 4 characters are:”;
cout<<“\n”<<(char)(ch+1)<<“\n”<<(char)(ch+2)<<“\n”<<(char)(ch+3)<<“\n”<<(char)(ch+4)<<“\n”;
return 0;
}

By Antony Agnel

I love helping people use WordPress and get better at blogging every day. Been doing that for 9+ years now.

2 comments

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.