Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace Architect_Arithmetic__TajMahalWithOneMethod
- {
- class Program
- {
- static void Main(string[] args)
- {
- CalculateTotalCost();
- }
- static void CalculateTotalCost(
- double length = 90.5,
- double width = 90.5,
- double bottom = 24.0,
- double height = 24.0
- )
- {
- double rectangleArea = length * width;
- double triangleArea = bottom * height;
- triangleArea *= 4;
- double flooringMaterialCost = 180;
- double totalShapeArea = rectangleArea + triangleArea;
- double totalCost = totalShapeArea * flooringMaterialCost;
- Console.WriteLine($"The total cost of the flooring material for the Taj Mahal is {totalCost} rupee!");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement