There was an example in my book where it was asked to write a program that prints the number 1 to 100 using 5 columns (Have each number separated from the next by a tab). The solution was as following:
#include "stdio.h"
int main()
{
int i;
for(i=1; i<=100; i++) {
printf("%d\t", i);
if((i%5)==0) printf("\n");
}
return 0;
}
But I can't understand the if((i%5)==0) printf("\n"); statement. Could you explain it for me?