-
-
Save codecademydev/236484286a1bccc5077cd388349e24f2 to your computer and use it in GitHub Desktop.
Codecademy export
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace ArchitectArithmetic | |
{ | |
class Program | |
{ | |
//rect method | |
static double Rect (double length, double width) { | |
return length * width; | |
} | |
//circle method | |
static double Circle (double radius) { | |
return radius * radius * 3.14; | |
} | |
static double Triangle (double bottom, double height) { | |
return 0.5 * bottom * height; | |
} | |
public static void Main(string[] args) | |
{ | |
double crcle = Circle(375)/2; | |
double rect = Rect(2600, 1500); | |
double tr = Triangle(500, 750); | |
double total = crcle + rect + tr; | |
double cost = total * 180; | |
Console.WriteLine("The total cost of this project will be: " + cost); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment