Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstring>
- using namespace std;
- int quan;
- char word[100005];
- int main()
- {
- cin >> word;
- for ( int i = 0; i < strlen(word); i++ )
- {
- if ( word[i] == ':' || word[i] == ';' )
- {
- for ( int x = i+1; x < strlen(word); x++ )
- {
- if ( word[x] == '-' )
- {
- continue;
- }
- if ( word[x] == '(' || word[x] == ')' || word[x] == '[' || word[x] == ']' )
- {
- quan++;
- i = x-1;
- break;
- }
- else
- {
- i = x-1;
- break;
- }
- }
- }
- }
- cout << quan;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement