Welcome

Hi! This blog is for beginners of c++ and java .You can check and pick codes for your programming assignments. This will also help you to understand the concepts of these programming languages. Its all about programming.

Diagrams By loops

Thursday, May 19, 2011

#include <iostream.h>

int main() {
    int i=0;
    int j=0;

    for (i;i<9;i++){        // outer loop - for rows
        for (j=0;j<=i;j++){ // inner for loop - for coloumns
            cout << "*";
        }  // end for loop - inner
        cout << endl;
    } // end for loop - outer

return 0;
}