67 087
Assignments Done
99,3%
Successfully Done
In November 2018

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
Expert's answer
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 first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions