Created
May 8, 2013 13:41
-
-
Save ahoulgrave/5540485 to your computer and use it in GitHub Desktop.
Cadenas de caracteres
This file contains 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@33915732@27.09.1988@River!Alberto Olmedo@52658954@13.01.1955@Olmedo FC!Carlos Perez@24551235@30.11.1974@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