#include <iostream>

#include <iomanip>

void fieldprint(int);

int colno = 0;

#define MAXCOLS 5

main ()

{

int i;

for (i=1;i<=20;i++) fieldprint(i);

cout << endl;

}

void fieldprint(int n)

{

cout << setw(5) << n;

if (++colno == MAXCOLS)

{

cout << endl;

colno = 0;

}

}