+ 1

I used C to solve the Gotham City and the program worked well in my laptop, why all the tests got failed ?

19th Mar 2020, 6:18 PM
Anam Quraishi
Anam Quraishi - avatar
9 Respostas
+ 4
I think your code is running successfully
22nd Mar 2020, 8:51 PM
Aritra Das
Aritra Das - avatar
+ 1
I checked it so many times. It's like the tests are constant.
19th Mar 2020, 6:46 PM
Anam Quraishi
Anam Quraishi - avatar
+ 1
Anam Quraishi could you please link up the code. You'll get help faster
19th Mar 2020, 6:53 PM
Preity
Preity - avatar
19th Mar 2020, 6:57 PM
Anam Quraishi
Anam Quraishi - avatar
+ 1
Anam Quraishi your print statement are different from mention in the task that's why it's casuing test case failure. #include <stdio.h> int main() { int criminal; //printf("Number of Criminals:\n"); scanf("%d", &criminal); if(criminal < 5) printf("%s", "I got this!\n"); else if(criminal <= 10) printf("%s", "Help me Batman\n"); else printf("%s", "Good Luck out there! \n"); return 0; }
19th Mar 2020, 7:06 PM
Preity
Preity - avatar
+ 1
Anam Quraishi capitalized letter at start of every word which is not in statement they want also no requirement of first print statement
19th Mar 2020, 7:09 PM
Preity
Preity - avatar
0
You must be missing something definitely
19th Mar 2020, 6:39 PM
✳AsterisK✳
✳AsterisK✳ - avatar
0
then what should I write there?
19th Mar 2020, 7:08 PM
Anam Quraishi
Anam Quraishi - avatar
0
Anam Quraishi Remove or comment line 6.no need to put that.. As preity said, you should not include any extra charecter or space in output... For ex: If criminal< 5 You should output only "I got this!" exactly, as given requirement in description.. with matching case also... ("I Got this!." is different, has extra dot G capitalised, so not matches Expexted output) So remove extra spaces in outputting and \n also...
22nd Mar 2020, 9:08 PM
Jayakrishna 🇮🇳