Untitled
unknown
plain_text
2 years ago
1.3 kB
13
Indexable
namespace ConsoleApp3
{
internal class Program
{
static void Main(string[] args)
{
string typeOfMovie = (Console.ReadLine());
int rows = int.Parse(Console.ReadLine());
int seats = int.Parse(Console.ReadLine());
double totalPrice = 0;
double normal = 7.50;
double discount = 5.00;
if (typeOfMovie == "Premiere")
{
double premierePrice = 12.00;
double totalPremierePrice = 0;
totalPremierePrice = rows * seats * premierePrice;
Console.WriteLine($"{totalPremierePrice:f2}");
}
else if (typeOfMovie == "Normal")
{
double normalPrice = 7.50;
double totalNormalPrice = 0;
totalNormalPrice = rows * seats * normalPrice;
Console.WriteLine($"{totalNormalPrice:f2}");
}
if (typeOfMovie == "Discount")
{
double discountPrice = 5.00;
double totalDiscountPrice = 0;
totalDiscountPrice = rows * seats * discountPrice;
Console.WriteLine($"{totalDiscountPrice:f2}");
}
}
}
}Editor is loading...