Advertisement
ruslanapetrova

Unique PIN Codes

Nov 2nd, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. #include <iostream>
  2. #include<string>
  3. #include <cmath>
  4. using namespace std;
  5. int main(){
  6.  
  7. int n1;
  8. int n2;
  9. int n3;
  10. cin >> n1;
  11. cin >> n2;
  12. cin >> n3;
  13.  
  14. for (int i = 1; i <= n1; i++) {
  15.  
  16. for (int j = 1; j <= n2; j++) {
  17.  
  18. for (int k = 1; k <= n3; k++) {
  19.  
  20. if (i % 2 == 0 && k % 2 == 0) {
  21.  
  22. if (j == 2 || j == 3 || j == 5 || j == 7){
  23. cout<< i<<" "<<j<< " " << k;
  24. cout<<endl;
  25.  
  26.  
  27.  
  28. }
  29.  
  30. }
  31. }
  32. }cout<<endl;
  33. }
  34.  
  35. return 0;}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement