if INPUT is : hello beautiful
world
OUTPUT should be : hello beautiful
but its not happening…why?
#include
using namespace std;
int main() {
char c,ch[40];
cin>>c;
for(int i=0;c!=’\n’;++i){
ch[i]=c;
cin>>c;
}
cout<<ch;
return 0;
}