Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main() {
- int i, valor, soma=0, count=0;
- scanf("%d", &valor);
- char carac[valor];
- for(i=0; i<=valor; i++) {
- scanf("%c", &carac[i]);
- if(carac[i] == 'P') count = count + 2;
- else if(carac[i] == 'C') count = count+2;
- else if(carac[i] == 'A') count++;
- else count = count + 0; }
- printf("%d", count);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement