Advertisement
Guest User

Hmm...

a guest
Oct 8th, 2015
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.52 KB | None | 0 0
  1. //by josh
  2. #include <iostream>
  3. #include <iomanip>
  4. using namespace std;
  5. int main()
  6. {
  7.     double dollars;
  8.     char code;
  9.     double total;
  10.     //input
  11.     cout << "How many dollars? ";
  12.     cin >> dollars;
  13.     cout << "What is your country code? ";
  14.     cin >> code;
  15.     //processing
  16.     if (code == 'C');
  17.         total = dollars * 1.01615;
  18.     else if (code == 'E')
  19.         total = dollars * .638490;
  20.     else if (code == 'I')
  21.         total = dollars * 40.1798;
  22. Whats wrong with those elses up there. VS is saying something is wrong.
  23. system("pause");
  24. return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement