Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace zad2
- {
- class Program
- {
- static void Main(string[] args)
- {
- var model = Console.ReadLine();
- var Vin = double.Parse(Console.ReadLine());
- var sustoqnie = Console.ReadLine();
- var cena = double.Parse(Console.ReadLine());
- var pechalba = cena * 0.15;
- if (sustoqnie == "good" && Vin < 90000 && Vin % 2==0 && pechalba > 400)
- {
- Console.WriteLine("yes - {0}", model);
- Console.WriteLine("profit - {0:f2}", pechalba);
- }
- else
- {
- Console.WriteLine("no");
- Console.WriteLine("The car is in bad condition");
- Console.WriteLine("VIN {0} is not valid", Vin);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement