1st approach:
#include<iostream>
#include<cstdio>
using namespace std;
int main()
{
int counts=0;
for(int i=1000; i>=1; i--)
{
counts++;
printf("%d\t",i);
if(counts%5==0)
{
printf("\n");
}
}
return 0;
}
2nd approach:
#include<iostream>
#include<cstdio>
using namespace std;
int main()
{
for(int i=1000; i>=1; i--)
{
if((i!=1000)&&(i%5==0))
{
printf("\n");
}
printf("%d\t",i);
}
return 0;
}