Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace _03
- {
- class Program
- {
- static void Main(string[] args)
- {
- double width = double.Parse(Console.ReadLine());
- double length = double.Parse(Console.ReadLine());
- int countCameras = int.Parse(Console.ReadLine());
- string firmName = Console.ReadLine();
- double area = width * length;
- double price = 0;
- if (firmName == "Dogramichka4You")
- {
- if (countCameras == 3)
- {
- price = 12;
- }
- else if (countCameras == 4)
- {
- price = 15;
- }
- else if (countCameras == 5)
- {
- price = 20;
- }
- }
- else if (firmName == "TihoToplo")
- {
- if (countCameras == 3)
- {
- price = 15;
- }
- else if (countCameras == 4)
- {
- price = 14;
- }
- else if (countCameras == 5)
- {
- price = 18;
- }
- }
- else if (firmName == "ChukChuk")
- {
- if (countCameras == 3)
- {
- price = 14;
- }
- else if (countCameras == 4)
- {
- price = 20;
- }
- else if (countCameras == 5)
- {
- price = 22;
- }
- }
- double totalPrice = area * price;
- Console.WriteLine($"Goshko has to spend {totalPrice:F2} leva.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment