It is possible to print 3 different functions horizontally instead of vertically?
1st function
2nd function
3nd function
So instead of printing it vertically, it would print it horizontally in a table. (like three different rows)
This is my function. And I want to print 3 of them in row.
public static void print_alpha() {
for (int k = 1; k < alpha.size(); k++ ) {
for (int i = 2*k - 1; i > 0 ; i-- ) {
System.out.printf("#");}
System.out.println("");
}
System.out.printf("-----");
System.out.println("");
System.out.println("");
}
Use System.out.print (or printf) instead of println. See http://docs.oracle.com/javase/6/docs/api/java/io/PrintStream.html#println(java.lang.String) to understand what println does.