Hi guys, this is strictly NOT homework but my own home study. Using just While loops, I managed to create an asterisk checkerboard with 8 asterisk columns and rows usinhg my own code below:
public class Exe432 { public static void main(String[] args) { int line_number = 1; int asterisk_amount = 1; while ( line_number <= 8 ) { while ( asterisk_amount <= 8 ) { System.out.print( "* " ); asterisk_amount += 1; } asterisk_amount = 1; System.out.println(); line_number += 1; } } }
That's cool, but I need the checkerboard to have indented rows on some exactly as such below:
* * * * * * * *
* * * * * * * *
* * * * * * * *
* * * * * * * *
* * * * * * * *
* * * * * * * *
* * * * * * * *
* * * * * * * *
Such a small problem but I'm finding it irritatingly difficult to make that one tweak. Added code to the one I already provided above is what I'd prefer thanks