For loop in c problem1 points·by pencil·16년 전·3 commentshere'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)); }4 commentsPost comment[+][deleted]·16년 전[–]fexl·16년 전replyshouldn't that be: for (a = 0; a <= 100; a = a+10) ?You have a comma after a=0.[–]messel·16년 전replyClose parens after a+10[–]fexl·16년 전replythat too![–]fexl·16년 전replyFresh: int main() { int a; for (a = 0; a <= 100; a += 10) printf(...); }
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)); }