C++ Saved Program: beautiful-mountain

facebook share

Here's the online compiler accompanied with IDE at your service. This is a saved code by one of our users. Try it out or save your own from the IDE page and don't forget to leave a feedback. You can find that at the bottom of the page.


#include <iostream>
using namespace std;

int main() {
	// your code goes here. Come on. You can change the whole world with a few lines of code
	char str[80],str1[80];
	int count=0,i;
	getline(cin,str);
	for(i=0;i<strlen(str);i++)
	{
	    if(str[i]!=' ')
	    {
	        str1[count++]=str[i];
	    }
	}
	str1[count]='\0';
	cout<<str1;

	return 0;
}
Execute

Output

Press the execute button or CTRL + enter to run code.

Inputs