Nested Loop: Number Triangle

 #include<iostream>

using namespace std;

int main(){

int i,j;

for(i=0;i<5;i++){

for(j=0;j<=i;j++)

cout<<j<<" ";

cout<<endl;

}

return 0;}



 

0 Comments had been done yet:

Post a Comment