What is the role of while t-- here please explain

My issue

My code

// Update the '_' in the code below

#include <bits/stdc++.h>
using namespace std;

int main() 
 int t;
 //accept the count of test cases given in the the 1st line
 //Run a loop to accept 't' inputs
   int N;
 //accept an integer N in each test case
 //output the number mirror for each test case
 return 0;

Learning course: C++ for problem solving - 1
Problem Link: CodeChef: Practical coding for everyone

it is for the number of inputs…if 4 inputs are to be given so the while loop will run for 4 times…t refers to the number of inputs or you can say test cases

Yeah ik that but what’s that – sign and how does it function there like it’s for decrease 1 I think so how does the loop will work ?

yess t will decrement by 1 everytime and when t becomes 0 the condition for while becomes false and you exit the loop

I understand thank you but I’ll better use for loop insted of getting confused here

Perfect , thanks .