Advertisement
IvanITD

6 / h) - Architect Arithmetic - Teotihuacan

Jan 25th, 2024 (edited)
773
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.92 KB | Source Code | 0 0
  1. namespace ArchitectArithmeticTeotihuacanOneMethod
  2. {
  3.     class Program
  4.     {
  5.         static void Main(string[] args)
  6.         {
  7.             CalculateTotalCost();
  8.         }
  9.  
  10.         static void CalculateTotalCost(
  11.             double length = 2500,
  12.             double width = 1500,
  13.             double radius = 187.5,
  14.             double bottom = 750,
  15.             double height = 500
  16.         )
  17.         {
  18.             double rectangleArea = length * width;
  19.             double circleArea = Math.PI * Math.Pow(radius, 2);
  20.             double triangleArea = 0.5 * bottom * height;
  21.  
  22.             double totalShapeArea = rectangleArea + circleArea + triangleArea;
  23.  
  24.             double flooringPrice = 180;
  25.  
  26.             double totalCost = totalShapeArea * flooringPrice;
  27.  
  28.             Console.WriteLine($"The total cost for the flooring material, for the Teotihuacan is: {Math.Round(totalCost):F2} pesos!");
  29.         }
  30.  
  31.     }
  32. }
Tags: C#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement