0

Can anyone please tell me what is wrong in my code

https://code.sololearn.com/cpy25DQcj02g/?ref=app

21st Nov 2022, 1:55 PM
Kunal Bodke
Kunal Bodke - avatar
7 Answers
+ 4
In declaration, variable don't allowed to have '-'. Use _ , instead of -. instead use short form like fail_students, pass_stidents simply.
21st Nov 2022, 2:44 PM
Jayakrishna 🇼🇳
+ 2
At line 8, 10 and 12 variable names (number_of_students_passed_in_exam, number_of_students_failed-in_exam) were written with spaces where underscores should be.
21st Nov 2022, 2:08 PM
Ipang
+ 1
Thanks
21st Nov 2022, 2:12 PM
Kunal Bodke
Kunal Bodke - avatar
+ 1
Still something is wrong can please check now ?
21st Nov 2022, 2:16 PM
Kunal Bodke
Kunal Bodke - avatar
+ 1
#include <stdio.h> #define NUM_PASSED_PROMPT "Enter the number of students passed in the exam: " #define NUM_FAILED_PROMPT "Enter the number of students failed in the exam: " int main() { int num_passed, num_failed, total; printf(NUM_PASSED_PROMPT); scanf("%d", &num_passed); printf(NUM_FAILED_PROMPT); scanf("%d", &num_failed); total = num_passed + num_failed; printf("%d + %d = %d", num_passed, num_failed, total); return 0; }
18th Dec 2022, 8:59 PM
Ű§Ù„ÙŠŰ§Űł Ű§Ù„ŰŽŰ±Ű§Ű±
Ű§Ù„ÙŠŰ§Űł Ű§Ù„ŰŽŰ±Ű§Ű± - avatar
0
There's no mistake in your code In the same input chose 2 number like 2 3 and result will be 5
22nd Nov 2022, 4:15 AM
Djeija Achraf
Djeija Achraf - avatar
0
Godddd
23rd Nov 2022, 8:36 AM
Sadegh pprog
Sadegh pprog - avatar