#include
using namespace std;
int main()
{
char ch;
ch=cin.get();
while(ch!=’\t’)
{
cout<<ch;
ch=cin.get();
}
return 0;
}
what is the problem in this program??
output :-
(input):- hello sheena
computer prints “hello sheena” as it is on the screen, and also the program is still not end i can write anything again and when i press enter it prints whatever i have written…
But ideally it should terminate after the spacebaar…like if i give input as:-
Hello sheena
it should print “Hello” only… and then program should end… but this is not happening… Why is this so?? I am running this program in sublime text 3…