Write a Java Program to print the ASCII values from the numbers 1 to 150.


Program

 class ascii

{

    public static void main(String args[])

    {

        for(int i=1;i<=150;i++)

        {

            System.out.println(i+"\t"+(char)i);

        }

    }

}


Program Window

Output



Comments

Post a Comment

Popular posts from this blog

Write a menu driven program to accept a number from the user and check whether it is a Buzz number or an Automorphic number. i. Automorphic number is a number, whose square's last digit(s) are equal to that number. For example, 25 is an automorphic number, as its square is 625 and 25 is present as the last two digits. ii. Buzz number is a number, that ends with 7 or is divisible by 7.

Write a program in Java that takes input using the Scanner class to calculate the Simple Interest and the Compound Interest with the given values: i. Principle Amount = Rs.1,00,000 ii. Rate = 11.5% iii. Time = 5 years Display the following output: i. Simple interest ii. Compound interest iii. Absolute value of the difference between the simple and compound interest.