Computer Science, asked by sravani7739, 11 months ago

Write a program that uses a loop to print the uppercase alphabet with the correct ASCII number next to each letter

Answers

Answered by prashantthapliyal
1

Answer:

class character {

void uppercaseAlphabets()

{

for (int c = 65; c <= 90; ++c) {

System.out.print(" " + c);

System.out.print("\n");

}

}

public static void main(String[] args)

{

System.out.println("Uppercase Alphabets");

character ob = new character();

ob.uppercaseAlphabets();

}

}

Explanation:

This is the java code for printing uppercase characters

Loop from 65 to 90 for uppercase letters.

Main method for calling the function uppercaseAlphabets.

Similar questions