public class pifagorTable {
public static void main(String[] args) {
int x=0;
int y=0;
final int horisLimit = 10;
final int vertLimit = 10;
System.out.println("Pifagor's table" );
System.out.print("\t");
for (y=1; y<vertLimit; y++){
System.out.print(y+ "\t");
}
printNewline();
for (y=1; y<vertLimit; y++){
System.out.print("*********");
}
printNewline();
for (y=1; y<vertLimit; y++){
System.out.print(y+"|" + "\t");
for(x=1; x<horisLimit; x++){
System.out.print(x * y + "\t");
}
printNewline();
}
}
}
public class helperFunctions {
public static void printNewline(){
System.out.println("");
}
}
public class charsStudy2 {
public static void main(String[] args) {
int i, j;
int iVal, iValDigits;
char iChar;
String myTabSpace;
for(i = 0; i<16; i++){
for(j = 0; j < 6; j++){
iVal = 65+i+j*16;
iValDigits = String.valueOf(iVal).length();
switch (iValDigits) {
case 1: myTabSpace = " -> "; break;
case 2: myTabSpace = "-> "; break;
case 3: myTabSpace = "->"; break;
default: myTabSpace = "->"; break;
}
System.out.print(iVal + myTabSpace);
iChar = (char)(iVal);
System.out.print(iChar);
System.out.print(" ");
}
helperFunctions.printNewline();
}
}
}