0
#include <iostream>
using namespace std;

int main() {
   int test_cases;cin>>test_cases;  // 1st input

   while(t--)
   {
    string input;
    getline(cin,input);   //2nd input
    cout<<"hello";
   }
    return 0;
}

when user enter 1...this program only print "hello" and stops it doesn't ask for another input. when user enter an value greater than 1, then this program executes for 1 times less than what user have entered. i don't know why this is happening!

0 Answers0