why to use while loop
// Change the 'custom inputs' below and click 'run'
// Click on 'Submit' once you have tried out to proceed to the next problem
using namespace std;
Learning course: C++ for problem solving - 1
Problem Link: CodeChef: Practical coding for everyone
Because u have to run your code for t test cases so u have to loop it for t test cases and then take input for each test case and then write your code.
you have to use looping in code like
//This is a example of for loop.[quote=“ch_jiwanshu, post:3, topic:110566, full:true”]
you can also use for loop like
here u can also use for loop , if u are comfortable with it. Here while loop is used to run the test case that u will enter n test case and it will take and run the input that n times. As mentioned in question to take test case.