Advertisement
Ohayoo

Untitled

Dec 17th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace zad2
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. var model = Console.ReadLine();
  14. var Vin = double.Parse(Console.ReadLine());
  15. var sustoqnie = Console.ReadLine();
  16. var cena = double.Parse(Console.ReadLine());
  17.  
  18. var pechalba = cena * 0.15;
  19.  
  20. if (sustoqnie == "good" && Vin < 90000 && Vin % 2==0 && pechalba > 400)
  21. {
  22. Console.WriteLine("yes - {0}", model);
  23. Console.WriteLine("profit - {0:f2}", pechalba);
  24. }
  25. else
  26. {
  27. Console.WriteLine("no");
  28. Console.WriteLine("The car is in bad condition");
  29. Console.WriteLine("VIN {0} is not valid", Vin);
  30. }
  31. }
  32. }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement