Advertisement
Guest User

Untitled

a guest
Dec 15th, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.37 KB | None | 0 0
  1. budget=float(input())
  2. ski=float(input())
  3. shteki=float(input())
  4.  
  5. shoes=ski*0.4
  6. cloths=ski*1.4
  7.  
  8. money=0
  9. whole=shoes+cloths+ski
  10. if(whole>=800):
  11.     whole+=0
  12. else:
  13.     whole=whole+shteki
  14. if(whole<=budget):
  15.     print(f"Angel's sum is {whole:.2f} lv. He has {budget-whole:.2f} lv. left.")
  16. else:
  17.     print(f'Not enough money! You need {whole-budget:.2f} leva more!')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement