Tuesday, 10 December 2013

Unknown

Display Triangle


/*
0
1 0
1 0 1
0 1 0 1 */
class Output2 {

    public static void main(String args[]) {
        for (int i = 1; i <= 4; i++) {
            for (int j = 1; j <= i; j++) {
                System.out.print(((i + j) % 2) + " ");
            }
            System.out.print("\n");
        }
    }
}

Unknown

About Blog No Baap -

Since 2016 BlogNoBaap has been bringing you the very best in all types of web resources. Posted daily, and delivered straight to your inbox each morning.

Subscribe to this Blog via Email :