fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int arr[10];
  6. int target = 0;
  7. int i;
  8.  
  9.  
  10. cin >> i;
  11.  
  12. arr[i] = 10;
  13.  
  14. if (target == 10) {
  15. cout<<"You shoot the target!\n";
  16. } else {
  17. cout<<"Oh no.\n";
  18. }
  19. cout << target;
  20. }
Success #stdin #stdout 0.01s 5548KB
stdin
-2
stdout
Oh no.
0