How to form a loop for series 1,3,5,9,12,15,20,24,28,34,39,43....
EDIT (by Nelek): The OP answered below
I GOT THE ANSWER AND FORMED THE LOOP:
IT IS AS FOLLOWS:-
int n=1;
int k;
cout<<"1";
for(int i=2;i<100;i++)
{
cout<<k=n+i<<k=k+i<<k=k+i+2;
n=k;
}
and Mr christian tnx for giving me advice....