When I give input as given in sample input. It gives me wrong sample output as :
11
1
instead of:
12
1
What is the problem in my code?
When I give input as given in sample input. It gives me wrong sample output as :
11
1
instead of:
12
1
What is the problem in my code?
Hey @yashsharma4304
Your approach is incorrect,u are not considering the type of cab or rickshaw
Here refer to this solution : https://ide.codingblocks.com/s/360304 
But I donβt know how to use arrays. Is there any other solution without using arrays?
No you have to consider arrays.
And arrays are quite basic in coding so I suggest u to go do them first and then come back to this problem 
Ok So I will first learn arrays then come back here again. Thank you for resolving my doubt. 