Added a pair of parenthese in line 31 around c=getchar() and add int before main() in line 8.