I can not display the first 5 divisibles by 3, I put a counter variable, but it returns another number.
#include <stdio.h>
#include <stdlib.h>
int main()
{
int n = 20;
for(int i=1; i<=n; i++) {
if(i%3 == 0)
printf("%d\n", i);
}
return 0;
}
Could someone explain me how?