Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <locale.h>
- int main (void){
- setlocale(LC_ALL,"PORTUGUESE");
- char frase[50];
- int i=0,la=0,laa=0,lc=0;
- printf ("Digite a Frase: ");
- gets(frase);
- for (i=0;i<=50;i++){
- switch(frase[i]){
- case 'a':
- la++;
- break;
- case 'A':
- laa++;
- break;
- case 'c':
- lc++;
- break;
- }
- }
- printf ("Letra a: %d\nLetra A: %d\nLetra c: %d\n",la,laa,lc);
- getch();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement