Advertisement
JonPettFG

vowels

May 27th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.38 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <string.h>
  3. int main() {
  4.   char string[1000], c=0;
  5.   int  i, tamanho;
  6.   printf("Digite a string");
  7.   fgets(string, 1000, stdin);
  8.   tamanho=strlen(string);
  9.   for(i=0; i<=tamanho; i++){
  10.     if(string[i]=='a' ||string[i]=='e' || string[i]=='i' || string[i]=='o' || string[i]=='u' ){
  11.       c++;
  12.     }
  13.   }
  14.   printf("Ha %i nessa string", c);
  15.   return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement