Powered By Blogger

18 February 2017

PROGRAM TO READ ALPHABET & DISPLAY IT'S NEXT CHARACTER IN ASCII

INPUT=

#include<iostream>
using namespace std;
int main()
{
        char x;
        int i;
        cout<<"Enter the alphabet =";
        cin>>x;
        i=x+1;
        cout<<"The ASCII of next character is ="<<i;
        return 0;
}


OUTPUT=

Enter the alphabet = A

The ASCII of next character is = 65

No comments:

Post a Comment