Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- int i=0,k=0;
- char ch[10];
- while(k!=3)
- {
- gets(ch);
- if(ch[0] == '-' && ch[1] == '-' && ch[2] == '*')
- {
- i+=1;
- }
- else if(ch[2] == '-' && ch[1] == '-' && ch[0] == '*')
- {
- i+=4;
- }
- else
- {
- if(ch[0] == 'c' && ch[1] == 'o' && ch[2] == 'w' && ch[3] == ' ' && ch[4] == 'c' && ch[5] == 'o' && ch[6] == 'w')
- {
- printf("%d\n",i);
- i=0;
- }
- }
- k++;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement