fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. bool test(int num)
  5. {
  6. int table[4];
  7. for (int i = 0; i <= 4; i++)
  8. if (table[i] == num) return true;
  9. return false;
  10. }
  11.  
  12. int main() {
  13. // your code goes here
  14. if (test(1))
  15. std::cout << "true" << std::endl;
  16. if (test(22))
  17. std::cout << "true" << std::endl;
  18. if (test(666))
  19. std::cout << "true" << std::endl;
  20. return 0;
  21. }
Success #stdin #stdout 0s 2680KB
stdin
Standard input is empty
stdout
Standard output is empty