Skip to content

Instantly share code, notes, and snippets.

@ahoulgrave
Created May 8, 2013 13:41
Show Gist options
  • Save ahoulgrave/5540485 to your computer and use it in GitHub Desktop.
Save ahoulgrave/5540485 to your computer and use it in GitHub Desktop.
Cadenas de caracteres
#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