'else' without a previous 'if'
问题 I am just beginning to learn C programming, so I am not really on an advanced level. Bear with me! I have this piece of code, and I guess that it is pretty easy to understand what I am trying to do. However I get an error saying the last else is called without an if before it. I suspect that the problem is my if-else statement inbetween the if and else. How would you guys solve it? int talet; scanf("%d", &talet); int i = 1; while (i <= 99) { int a; { if (i % talet == 0 || talet == (i / 10) %