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