TOP CONTENT
admin  

Write a java program to take a character as input, find its assci code and then reverse it and print corresponding character. And check whether it’s an vowel or not.

import java.util.*;
class Reverse_AssciCode
{
   public static void main()
   {
    Scanner Sc=new Scanner(System.in);
    System.out.println("Enter the Character");
    char c=Sc.nextLine().charAt(0);
    int ca=(int)c;
    System.out.println("Assci Code of "+c+" is "+ca);
    int ra=0;
    while(ca!=0)
    {
        int x=ca%10;
        ra=(ra*10)+x;
        ca=ca/10;
    }
    System.out.println("Reverse Assi code is "+ra);
    char r=(char)ra;
    if(r=='A'||r=='E'||r=='I'||r=='O'||r=='U'||r=='a'||r=='e'||r=='i'||r=='o'||r=='u')
    System.out.println("It's a vowel( "+r+" )");
    else
    System.out.println("It's not a vowel( "+r+" )");
   }
}

In this post i have shared a java program which is mostly asked by students of computer science.

THANK YOU FOR VISITING OUR BLOG.For more related posts and anime,programing,gaming post please regularly check our blog.

THANK YOU!!!!!!!!!!!!

Leave A Comment