Number Pattern 1 in C++
Number Pattern 1
Send Feedback
Number Pattern 1
1
23
345
4567
N (Total no. of rows)
Pattern in N lines
3
1
23
345
#include<iostream>using namespace std;
int main(){ int row=1; int n; cin>>n; while(n>=row){ int col=1; int copy=row; while(row>=col){ cout<<copy; copy++; col++; } cout<<endl; row++; } }
Comments
Post a Comment