Answer to Question #57966 in Java | JSP | JSF for Kenya

Question #57966
. Write a Java program that displays the ASCII characters for values from 33 to 126, inclusive. Print 20 characters per line, each character separated from the next by 2 spaces
1
Expert's answer
2016-02-22T02:38:58-0500
Solution

public static void main(String[] args) {

char i,t=0;
for(i=33;i<126+1;i++,t++)
{
if(t%20==0)
System.out.println();
System.out.print((char)(i));
System.out.print(" ");
}
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS