I have stuck with one problem.
I have created my own program that will work.
In program there are two for loop.
Now my problem is
for(int i=0;i<q;i++)
{
for(int r=0;r<q;r++)
{
/*perform some kind of operations
returns one integer value.*/
/*here q=4 so first time r loop execute 4 times
but, when it completes for i=0,it will return one no.
when i=1,it again goes to r loop, but it will skip r loop,of the no. returned by it previously.
when i=2,there will be again one no. returned by it, this time it will skip two r loop.
and same as it is upto end.*/
}
int number=no. to skip;
}
please help me how can i design such logic.