Advertisement
hmcristovao

Lista 04 - exercício 18

May 17th, 2012
322
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.36 KB | None | 0 0
  1. #include <stdio.h>
  2. int main() {
  3.    char nome[50];
  4.    int qtdeVogais=0;
  5.  
  6.    printf("Qual o seu nome?");
  7.    gets(nome);
  8.  
  9.    int i;
  10.    for(i=0; nome[i] != '\0'; i++)
  11.       if(nome[i]=='a' || nome[i]=='e' || nome[i]=='i'
  12.          || nome[i]=='o' || nome[i]=='u')
  13.          qtdeVogais++;
  14.  
  15.    printf("\nQuantidade de vogais: %d", qtdeVogais);
  16.    return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement