Book allocation problem


here is my code, my code is correct but i am not able to figure out the error

you forgot to take t
before while loop
take input t
cin>>t

please mark this doubt as resolved :grinning: