hi all,
i am new here..
and i need help..
when we print this shape
1
2 3
3 4 5
4 5 6 7
5 6 7 8 9
6 7 8 9 10 11
7 8 9 10 11 12 13
8 9 10 11 12 13 14 15
we print this program..
i have programed thatCode:for(i=1;i<=8;i++) { k=i; for(j=1;j<=i;j++) { cout<<k; k++; } cout<<endl; }
but when my teacher ask me this one
in this one i need help
1
5 3
6 4 5
7 5 6 7
8 6 7 8 9
7 8 9 10 11
8 9 10 11 12 13
9 10 11 12 13 14 15
please help me...