Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Created March 15, 2020 20:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codecademydev/236484286a1bccc5077cd388349e24f2 to your computer and use it in GitHub Desktop.
Save codecademydev/236484286a1bccc5077cd388349e24f2 to your computer and use it in GitHub Desktop.
Codecademy export
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