Test cases are not running


why my test cases are not passing?

@Tanushree you are not printing your output anywhere

okay…i got it
Can u say what is the error in this code?

Can u please check the code?link is given above

@Tanushree you are taking your input n inside your while loop. i have updated your code it works fine (https://ide.codingblocks.com/s/209840).

thanks a lot…I Have checked…now it works

I am having one question…in line 4 (int *p)is taken…can I take there (int p[])instead of *p?

@Tanushree yeah you can do it.

okay…thanks…

1 Like