123
for(y<=x) cout<<c<<" "; y=y+1;
for(y<=x){ cout<<c<<" "; y=y+1;}
for(y<=x) cout<<x <<" "; y=y+1;
for(y=1;y<x;y++)
1234567891011121314
#include <iostream> using namespace std; int main() { int x; cout << "Enter a number "; cin >> x; for( int y = 0; y < x; y++) cout << y + 1 << " "; cout << "\n" << endl; return 0; }