REPLACE ALL PI WITH 3.14

Test case not satisfied!

Hey @mverma_be19
Replace your main() by this :slight_smile:

int main() {
char s1[100000];
int n;
cin>>n;
while(n--)
{
cin>>s1;
replace_all_pi(s1,0);
cout<<s1<<endl;
}
return 0;
}

This is how we take multiple inputs and give their output

Oh okay. I know that. But I got confused because I though first we need to take all the three strings as input and then display the output. Anyhow what was the problem in taking input using three different char array ?

there will be n inputs
and what you are doing was taking 3n inputs
because of 3 cin statements inside while loop