Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main (){
- char frase[101];
- int i;
- int contador = 0;
- printf("Informe a frase: ");
- gets(frase);
- for (i = 0; i < 101; i++){
- if ( frase[i] == ' '){
- contador++;
- }
- }
- printf("Numero de espaços: %d", contador);
- getchar();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement