I’ve been doing this problem
In which for taking input from user in C++ I wrote the code
do
{
cin>>n>>s;
}while(s!='\n');
with which I am not able to take inputs but if I changed it to
do
{
scanf("%d""%ch",&n,&s);
}while(s!='\n');
it worked perfectly.
Can somebody explain Please.
Thanks.
PS. Also tell me how to format code in answers so it comes in grey box.