+ 1

Why my question was declined in quiz factory?

I added a question to quiz factory, the question is in c Sharp as follows: What is the output of this code? int x=3; if(x = 2) {Console.WriteLine("x=2");} else if (x<5) {Console.WriteLine("x<5");} else if (x=3) {Console.WriteLine("x=3");} the answer is x<5 I still don't know why it was declined?

16th May 2017, 5:35 PM
Rabee Abbas
Rabee Abbas - avatar
3 Answers
+ 9
No, the output is a compilation error. You cannot convert int to bool like this. if(x = 2) = is not a comparison, use ==. There's also quite a few questions like that, it may get declined even if it works. But please atleast test your question in a compiler before submitting.
16th May 2017, 5:51 PM
Rrestoring faith
Rrestoring faith - avatar
+ 6
don't worry @rabee.....it happens sometimes.... >>just let it go for now.....but U keep trying more (quiz)question my friend .....one day they definitely accept your question ....😊
16th May 2017, 5:50 PM
#Happy@777
#Happy@777 - avatar
+ 1
thanks
16th May 2017, 5:52 PM
Rabee Abbas
Rabee Abbas - avatar