Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- int main()
- {
- int i;
- char name[40];
- printf("Entre com uma palavra:\n");
- gets(name);
- for (i = 0; i < strlen(name); i++)
- {
- if (i == strlen(name) - 1)
- printf("%c",name[i]);
- else
- printf("%c-",name[i]);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment