does anybody know why this piece of code is not compiling?
Code:
#include <stdio.h>
#include <stdlib.h>
int palindromic(int number);
int main() {
int greatest = 0;
/* for (startValue1 = 999; startValue1 >= 0; startValue1--) {
for (startValue2 = 999; startValue2 >= 0; startValue2--) {
if (palindromic(startValue1 * startValue2))
greatest = startValue1 * startValue2;
}
} */
int i = 1021;
palindromic(i);
return 0;
}
int palindromic(int number) {
char numstr[7]; // '\0'
itoa(number, numstr, 10);
printf("%s\n", numstr);
return 0;
}
the error should be located in the palindromic function