This code show an run time error. why?

this code is running well on my system. and showing result also but on online ide it show run time erroe. how ??
the other problem is its= runs 3 test case correctly but failed in 2nd one. do you suggest any of that type. like -ve no. and explain it a little bit because when i try to use compiler just take +ve no. even if i provide no. with _ve prefix.

Hi @Adi_choudhary
share your code here.

you don’t have to write “enter the element greater than 2” during input.See the input format is that you have to simply give an input and it can be any number and then execute your code on that number and check that whether the number is prime or not and print that as ourput.

Hi @Adi_choudhary,
As you are not responding to the thread, I am marking your doubt as resolved for now. Re-open it if required.

Please mark your doubts as resolved in your course’s “Ask Doubt” section, when your doubt is resolved.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.


i think now i cover all integers in my code …but it still showing me one test case as wrong answer … do u please tell me whats i am missing in this code??

Hi see you only have to print whether the number is prime or not,you don’t have to do write unknown or anything else.Just print your ans in the form of output format given.