Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Exemplo de exercício em Linguagem C
- Diego Mendes Rodrigues
- */
- #include <stdio.h>
- #include <string.h>
- int main(void)
- {
- int index = 0;
- char letras[5] = "Joao";
- for (int contador=1; contador<=(strlen(letras)*5); contador++)
- {
- printf("\n %c", letras[index]);
- if (contador % 5 == 0)
- {
- if (index ==3)
- index=0;
- else
- index++;
- }
- }
- printf("\n\n");
- //system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement