For loop in c problem

1 points by pencil ↗ HN
here's the code.can someone tell me what's the problem with this? #include <stdio.h>

int main() { int a; for (a=0,a<=100; a = a + 10;printf("%4d degrees F = %4d degrees C\n", a,(a - 32) * 5/9)); }

5 comments

[ 3.2 ms ] story [ 14.0 ms ] thread
Close parens after a+10
shouldn't that be:

  for (a = 0; a <= 100; a = a+10)
?

You have a comma after a=0.

Fresh:

  int main()
    {
    int a;
    for (a = 0; a <= 100; a += 10)
      printf(...);
    }
(comment deleted)