Neptune615YT

Usd money converter in c++20

Nov 29th, 2023 (edited)
510
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.09 KB | Money | 0 0
  1. // money as of right now (taka, yen, pounds, pesos, euro)
  2. /*
  3.  
  4.  
  5.  
  6.  
  7.         THANK YOU FOR USING MY CODE
  8.         info: Usd coverter to diffrent money types (says so above)
  9.        
  10.  
  11.  
  12. */
  13. // if ur using my pastebin THANK YOU ALOT!!
  14.  
  15. #include <iostream>
  16.  
  17. int main() {
  18.     double Usd;
  19.     std::cout << "Enter USD here: ";
  20.     std::cin >> Usd;
  21. int choice;
  22.     std::cout << "Here are your options\n";
  23.         std::cout << "1:taka 2:yen 3:pounds 4:pesos 5:euro\n";
  24.         std::cout << "What would you like to convert it to: ";
  25.     std::cin >> choice;
  26.  
  27.  
  28. switch(choice){
  29. case 1:
  30.     std::cout << "The Usd You Entered to taka is: " << Usd * 109.68;
  31. break;
  32.  
  33. case 2:
  34.     std::cout << "The Usd You Entered To Yen is: " << Usd * 147.10;
  35. break;
  36.  
  37. case 3:
  38.     std::cout << "The Usd You Entered To Pounds is: " << Usd * 0.79;
  39. break;
  40.  
  41. case 4:
  42.     std::cout << "The Usd You Entered To Pesos is: " << Usd * 17.13;
  43. break;
  44.  
  45. case 5:
  46.     std::cout << "The Usd You Entered To Euro is: " << Usd * 0.91;
  47. break;
  48.  
  49. default:
  50.     std::cout << "Please Enter a Correct Number";
  51. break;
  52. }
  53.     return 0;
  54. }
Advertisement
Comments
Add Comment
Please, Sign In to add comment