Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- #include <string>
- #include <math.h>
- using namespace std;
- int main(){
- int k=0;
- string s;
- getline (cin, s);
- int dlin=(int)s.length();
- for(int i=0;i<dlin;i++){
- if(s[i]==' '){
- if(k==0){
- cout<<"";
- k++;
- }else{
- cout<<s[i];
- }
- }else{
- cout<<s[i];
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement