fork(1) download
  1. #include<iostream>
  2. using namespace std;
  3. int main()
  4. {
  5. int t,i,J;
  6. char a[100];
  7. cin>>t;
  8. for(i=0;i<t;i++)
  9. {
  10. int count=0;
  11. gets(a);
  12. for(int j=0;a[j]=='\0';i++)
  13. {
  14. if((a[j]=='A')||(a[j]=='D')||(a[j]=='O')||(a[j]=='P')||(a[j]=='Q'||)(a[j]=='R'))
  15. {
  16. count=count+1;
  17. }
  18. if(a[j]=='B')
  19. {
  20. count=count+2;
  21. }
  22. }
  23. cout<<count;
  24. }
  25. return 0;
  26. }
  27.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function 'int main()':
prog.cpp:14: error: expected primary-expression before ')' token
stdout
Standard output is empty