Delhi's Odd even programm

can someone help me with the code of this programm

Reference Code

can u please explain what is ‘t’ here and why are we using t–

we need to take three input and in this code only two inputs have been shown

t is no of testcases
first line of input denotes the no. of car’s number given to you
that is t in my code

here I have taken t+1 inputs
first the number t
then t more inputs using while loop

https://ide.codingblocks.com/s/622517 Thi

https://ide.codingblocks.com/s/622517 This is my code i am trying to make this code using function can you please tell me what i am doing wrong here

Modified Code

mistakes are commented in the code

i think you are not comfortable with functions
you can define functions in many ways based on the return type of function

to know more about function you can refer to this

ohh thank u so much it really helped

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.