#include <stdio.h>
int numero=6;
int numerodos=4;
int result=numero*numerodos;
main()
{
while (result<200) {
printf("The product of %d and %d is %d", numero, numerodos, result);
result=result+1
}
}
I know the algorithm is bad, I'm not focused on that. But at line 3 I get an "initializer element is not constant" error in Codeblocks. I was wondering why that is? I am not dealing with large objects, and that is what other stackflow's have said the error relates to. If I initialize line 3 in the main function after printf; however, it builds and runs fine albeit terrible code.