this is the solution and i accept any one comment on my codes
int n;
cin >> n;
for(int i=1; i<n+1 ;i++)
{cout << endl;
for(int j=1; j<i+1; j++)
cout << i;
}

if im not mistaken this person is not asking this solution for homework but for his/her own stdy
because this same Q i have it in my tutorial
and after one day only we r having final exam << so scared

actually i agree not posting solutions only and only because of cheating
otherwise why not?
maybe some1 will say spoonfeeding
so why not
i agree with spoonfeeding the information and knowlage especially for begging so will have a strong foundation within short time
lets save this time and energy for what no one knows about