Created
May 8, 2013 13:41
-
-
Save ahoulgrave/5540485 to your computer and use it in GitHub Desktop.
Cadenas de caracteres
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdlib> | |
#include <iostream> | |
using namespace std; | |
int main(int argc, char *argv[]) | |
{ | |
char s_Str[150] = "Agustin Houlgrave@[email protected]@River!Alberto Olmedo@[email protected]@Olmedo FC!Carlos Perez@[email protected]@Banfield"; | |
int n_Len = strlen(s_Str); | |
for (int i = 0; i < n_Len; i++) { | |
if (s_Str[i] != '@' && s_Str[i] != '!') { | |
printf("%c",s_Str[i]); | |
} else if (s_Str[i] == '!') { | |
printf("\n"); | |
} else { | |
printf("\t"); | |
} | |
} | |
printf("\n\n"); | |
system("PAUSE"); | |
return EXIT_SUCCESS; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment