Проблем при Small Shop
Всичко проверих и не намирам грешка. Но всичко освен входът (beer Sofia 6) не показва резултат?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SecondApp
{
class Program
{
static void Main(string[] args)
{
string product = Console.ReadLine();
string town = Console.ReadLine();
double quantity = double.Parse(Console.ReadLine());
double productPrice = 0.00;
if (town == "Sofia")
{
if (product == "coffee")
{
productPrice = 0.50;
}
else if (product == "water")
{
productPrice = 0.80;
}
else if (product == "beer")
{
productPrice = 1.20;
}
else if (product == "sweets")
{
productPrice = 1.45;
}
else if (product == "peanuts")
{
productPrice = 1.60;
}
else if (town == "Plovdiv")
{
if (product == "coffee")
{
productPrice = 0.40;
}
else if (product == "water")
{
productPrice = 0.70;
}
else if (product == "beer")
{
productPrice = 1.15;
}
else if (product == "sweets")
{
productPrice = 1.30;
}
else if (product == "peanuts")
{
productPrice = 1.50;
}
else if (town == "Varna")
{
if (product == "coffee")
{
productPrice = 0.45;
}
else if (product == "water")
{
productPrice = 0.70;
}
else if (product == "beer")
{
productPrice = 1.10;
}
else if (product == "sweets")
{
productPrice = 1.35;
}
else if (product == "peanuts")
{
productPrice = 1.55;
}
}
}
double result = productPrice * quantity;
Console.WriteLine(result);
}
}
}
}