fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int arr[] = {200, 400, 1000, 3000};
  6. int level = 2;
  7. int exp = arr[level - 1];
  8. cout << "For level " << level << " exp is = " << exp << endl;
  9. return 0;
  10. }
Success #stdin #stdout 0s 16064KB
stdin
Standard input is empty
stdout
For level 2 exp is = 400