This is my code for a fizzbuzz function. With 'int num' that prompts the user for an integer, then prints all of the numbers from one to that integer.
void fizzbuzz(int num) {
int i;
printf("Max value? %d\n", num);
for(i = 1; i <= num; i++) {
if (i % 3 == 0)
printf("Fizz ");
if (i % 5 == 0)
printf("Buzz ");
if ((i % 3 != 0) && (i % 5 != 0))
printf("%d ", i);
if (i % 20 == 0)
printf("\n");
}
}
int main() {
fizzbuzz(100);
}
However I get a too few arguments to function fizzbuzz(); Im submitting this through codestepbystep but on atom my code runs with no problem. What's the problem with my program, i feel like its a very simple fix but I could not find anything on the internet.