Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var car_model = Console.ReadLine();
- var vin = int.Parse(Console.ReadLine());
- var condition = Console.ReadLine();
- var price = int.Parse(Console.ReadLine());
- bool accept = false;
- var profit = price*(0.15);
- if(condition == "good"){
- accept = true;
- } else {
- accept = false;
- }
- if(vin<90000 && accept == true){
- accept = true;
- } else {
- accept = false;
- }
- if(profit > 400 && accept == true){
- accept = true;
- } else {
- accept = false;
- }
- if(accept == true){
- Console.WriteLine("yes - {0}", car_model);
- } else {
- Console.WriteLine("no");
- if(condition != "good"){
- Console.WriteLine("The car is in bad condition");
- }
- if(vin>90000){
- Console.WriteLine("VIN {0} is not valid", vin);
- }
- if(profit < 400){
- Console.WriteLine("Cannot make discount, profit too low – {0}, profit");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement