Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (s[z]=='M')
- {
- if(s[++z]=='M')
- {
- wynik=wynik+2000;
- z=z+2;
- }
- else
- {
- wynik=wynik+1000;
- z=z+1;
- }
- }
- if (s[z]=='D')
- {
- if (s[--z=='C'])
- {
- wynik=wynik+400;
- z=z+1;
- }
- else
- {
- wynik = wynik +500;
- }
- z=z+1;
- }
- if(s[z]=='C')
- {
- if (s[++z] =='D')
- {
- wynik = wynik + 400;
- z=z+1;
- }
- else
- {
- wynik = wynik +100;
- z=z+1;
- }
- }
- cout<<wynik<<endl;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement