Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- int main() {
- short int caw_caw = 0,
- amount = 0;
- char blink[11];
- while (caw_caw < 3) {
- scanf("%10[^\n]", blink);
- fflush(stdin);
- if (!strcmp(blink, "caw caw")) {
- printf("%hd\n", amount);
- amount = 0;
- caw_caw++;
- } else {
- if (blink[0] == '*') amount += 4;
- if (blink[1] == '*') amount += 2;
- if (blink[2] == '*') amount += 1;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement