Advertisement
Guest User

Untitled

a guest
May 28th, 2020
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. #include<iostream>
  2. #include<stdio.h>
  3.  
  4.  
  5. #define MIN(h,g) (((h)<(g)) ? h:g)
  6. using namespace std;
  7.  
  8.  
  9.  
  10. int main(){
  11.  
  12. int w;
  13. int neamt,suceava;
  14. int judet;
  15. int Cluj, Alba;
  16.  
  17. cout<<"Introduceti judetul: ";
  18. cin>>judet;
  19.  
  20.  
  21. if(judet=neamt)
  22. {
  23. Cluj=200;
  24. Alba=300;
  25. }
  26.  
  27. if(judet=suceava)
  28. {
  29. Cluj=400;
  30. Alba=500;
  31. }
  32.  
  33. w= MIN(Cluj,Alba);
  34. cout<<"\nCea mai apropiata reprezentanta se afla la "<<w<<" km de dvs.";
  35.  
  36.  
  37.  
  38. return 0;
  39.  
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement