Fix Code | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
23rd Feb 2023, 3:02 AM
Lương Trung Hiếu
Lương Trung Hiếu - avatar
1 Answer
+ 4
Lương Trung Hiếu I see two problems that prevent it from compiling and running. The scanf arguments in line 6 are all inside the format string. Change from this: scanf("%d%d%d,&KT,&GK,&CK"); To this: scanf("%d%d%d", &KT,&GK,&CK); Also, line 4 and line 9 have duplicate declarations for variable TB. Remove line 4. That should allow the program to run. I am unclear whether the logic does what you intend. Let us know if you need further help.
23rd Feb 2023, 4:02 AM
Brian
Brian - avatar