. 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
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!
Learn more about our help with Assignments:
JavaJSPJSF