//please debug program // need Scanner output import java.util.Scanner; // Display every character between Unicode 65 and 122 // Start new line after 20 characters
public class DebugSix2 { public static void main(String args[]) { Scanner sc = new Scanner(System.in); char letter; int a; final int MIN = 65; final int MAX = 122; final int NUMPERLINE = 200; final int STOPLINE1 = 0; final int STOPLINE2 = STOPLINE1 + NUMPERLINE; for(a = MIN; a <= MAX; a++) { letter = (char)a; System.out.print(" " + letter); if((a == STOPLINE1) && (a == STOPLINE) System.out.println(); } System.out.println("\nEnd of application"); } }
import java.util.Scanner;
public class DebugSix2 {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
char letter;
int a;
final int MIN = 65;
final int MAX = 122;
final int NUMPERLINE = 200;
int STOPLINE1 = 1;
for(a = MIN; a <= MAX; a++)
{
letter = (char)a;
System.out.print(" " + letter);
if(STOPLINE1%20==0)
System.out.println();
STOPLINE1++;
}
System.out.println("\nEnd of application");
}
}
Get Answers For Free
Most questions answered within 1 hours.