Advertisement
Cnvmendoza

Array Replacement Example

Nov 9th, 2021 (edited)
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.31 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. float potPrice[7] = {90, 157.5, 157.5, 99, 67.5, 99, 90};
  4. int country;
  5.  
  6. int main(){
  7.     cout << "1. Sweden";
  8.     cout << endl;
  9.     cout << "2. Poland";
  10.     cout << endl;
  11.     cout << "Choose country: ";
  12.     cin >> country;
  13.     country1 = country-1;
  14.     cout << potPrice[country1];
  15. }
  16.  
  17.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement