Advertisement
Guest User

Untitled

a guest
Nov 15th, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5.  
  6.  
  7. int main()
  8. {
  9.  
  10. // ~~~ Variablat < ~~~~~~~~~~~~~~~~~~~//
  11. int nr,res;
  12. char zgjidh;
  13. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
  14. //~~~~~~~ Fillimi programit~~~~~~~~~~~//
  15. fillimi:
  16. cout<<"Sheno 'e' - Eur/Den"<<endl;
  17. cout<<"Sheno 'd' - Den/Eur"<<endl;
  18. cin>>zgjidh;
  19. zgjidh = tolower(zgjidh);
  20. switch(zgjidh){
  21. case 'e': cout<<"Sa Euro?"<<endl;
  22. cin>>nr;
  23. res=nr*61.5;
  24. cout<<"Rezultati: "<<res<<endl;
  25. break;
  26. case 'd': cout<<"Sa Den?"<<endl;
  27. cin>>nr;
  28. res=nr/61.5;
  29. cout<<"Rezultati: "<<res<<endl;
  30. break;
  31. default: cout<<"Shkronje e gabuar, try again :D"<<endl;
  32. goto fillimi;
  33. }
  34. /*
  35. if(zgjidh == 'e'){
  36. cout<<"Sa Euro?"<<endl;
  37. cin>>nr;
  38. res=nr*61.5;
  39. cout<<"Rezultati: "<<res<<endl;
  40. }
  41. else if(zgjidh == 'd'){
  42. cout<<"Sa Den?"<<endl;
  43. cin>>nr;
  44. res=nr/61.5;
  45. cout<<"Rezultati: "<<res<<endl;
  46.  
  47. }
  48. else{
  49. cout<<"Numer gabim i shenuar, retry :D"<<endl;
  50. goto fillimi; // Labela <<
  51. }
  52. */
  53. //~~~~~~~ Fundi programit~~~~~~~~~~~//
  54. return 0;
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement