Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main(){
- int m,cont=0;
- char x;
- while(m!=1){
- printf("\nIngrese una letra: ");
- scanf("%c",&x);
- fflush(stdin);
- switch(x){
- case 'a': cont++;
- break;
- case 'e': cont++;
- break;
- case 'i': cont++;
- break;
- case 'o': cont++;
- break;
- case 'u': cont++;
- break;
- case '#': m=1;
- break;
- default:
- break;
- }
- }
- printf("\nHay %d vocales",cont);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment