Advertisement
adefajrariav

Untitled

Dec 13th, 2016
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. ====== CODING 1 =======
  2. ====== By Iav Inc =====
  3. #include <iostream>
  4. using namespace std;
  5. void main()
  6. {
  7. int n;
  8. cout << "Masukan Yang di beli (Pilih : 1.Ayam 2.Bebek 3.Sapi) Ketik Nomornya = ";
  9. cin>> n;
  10. switch (n)
  11. {
  12. case 1 :
  13. cout << "Masukan Berapa KG Ayam = ";
  14. cin >> n;
  15. n = n * 50000;
  16. cout << "Total Harga = " << n <<endl;
  17. break;
  18. case 2 :
  19. cout << "Masukan Berapa KG Bebek = ";
  20. cin >> n;
  21. n = n * 65000;
  22. cout << "Total Harga = " << n << endl;
  23. break;
  24. case 3 :
  25. cout << "Masukan Berapa KG Sapi = ";
  26. cin >> n;
  27. n = n * 80000;
  28. cout << "Total Harga = " << n << endl;
  29. default:
  30. break;
  31.  
  32. }
  33.  
  34. ===== Coding 2 =====
  35. ===== By Iav Inc ===
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement