… …
This should suffice I suppose:
.........................
Or if you are eventually going to print the result,
while(n--)
.........................
int i,j,n;
scanf("%d",&n); j=0;
for(i=(n-1);i>=0;--i)
{
..........
}
thanks to rajat for help.
Hi, that’s actually a problem from an ongoing contest. https://www.hackerrank.com/contests/infinitum-aug14/challenges/akhil-and-gf Please do not ask questions related to this problem, while it is ongoing.
1 Like