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 HousePrice
- {
- class Program
- {
- static void Main(string[] args)
- {
- // • Първия ред – площта на най - малката стая – реално число в интервала[1.00...100.00]
- //• Втория ред – площта на кухнята – реално число в интервала[1.00...100.00]
- //• Третия ред – цена на квадратен метър – реално число в интервала[1.00...1000.00]
- double smallestRoomArea = double.Parse(Console.ReadLine());
- double kitchenArea = double.Parse(Console.ReadLine());
- double pricePerSquareMeter = double.Parse(Console.ReadLine());
- double secondRoomArea = smallestRoomArea * 1.1;
- double thirdRoomArea = secondRoomArea * 1.1;
- double bathroom = smallestRoomArea / 2;
- double areaWithoutCorridor = smallestRoomArea +
- secondRoomArea +
- thirdRoomArea +
- bathroom +
- kitchenArea;
- double totalArea = areaWithoutCorridor * 1.05;
- double priceForTotalArea = totalArea * pricePerSquareMeter;
- Console.WriteLine($"{priceForTotalArea:f2}");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement