BoxerTC

Untitled

May 10th, 2015
293
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.31 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. void limpiar_frase(string &texto){
  4.     int contador;
  5.     contador = texto.size();
  6.    
  7.     for(int i=0;i<contador-1;i++){
  8.         if(texto[ i ] == ' ' && texto[ i ] == ' '){
  9.             texto = texto.erase(i+1,1);
  10.             contador = contador - 1;
  11.         }
  12.     }
  13.     cout << texto;
  14.    
  15. }
  16. int main(){
  17.    
  18. }
Advertisement
Add Comment
Please, Sign In to add comment