Question: Please write in Java for me. Your computer lab often runs out of chairs to sit in during programming practices. In order to overcome this

Please write in Java for me.Please write in Java for me. Your computer lab often runs out

Your computer lab often runs out of chairs to sit in during programming practices. In order to overcome this hardship, the team borrows chairs from other adjacent rooms. Given the number of people who are coming to practice and the number of chairs in the room, how many more chairs must the team take from other rooms? Sometimes there are enough chairs to begin with. In this case, we need not take any more chairs to the room. Input The input will begin with a single line containing T, the number of test cases to follow. On each of the next T lines there will be two integers, N ( 1SN s 10) and M single space. N is the number of people coming to practice that day and M is the number of chairs already in the room that day (O s M), separated by a Output The output will consist of T lines, each containing a single number the number of additional chairs needed for that day. Sample Input Sample Output 2 10 9 15 8 7

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!