fork download
  1. #include <iostream>
  2. using namespace std;
  3. int main(){
  4. int a[50];
  5. int n, q=0;
  6. cout<<"n=";cin>>n;
  7. for(int i=0;i<n;i++){
  8. cout<<"a["<<(i+1)<<"]=";
  9. cin>>a[i];
  10. }
  11. for(int i=0;i<n;i++){
  12. if(a[i] % 3 == 0 && a[i] % 2 == 1)
  13.  
  14. q++;
  15.  
  16. }
  17. cout<<"***************************"<<endl;
  18. cout<<"q="<<q;
  19. return 0;
  20. }
Success #stdin #stdout 0s 16064KB
stdin
Standard input is empty
stdout
n=***************************
q=0