Skip to content

Instantly share code, notes, and snippets.

@seddik
Created September 6, 2014 11:23
Show Gist options
  • Save seddik/ffb720db0c12331b4c91 to your computer and use it in GitHub Desktop.
Save seddik/ffb720db0c12331b4c91 to your computer and use it in GitHub Desktop.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace salary
{
class Program
{
static void Main(string[] args)
{
double H = YacineReadLine("Enter You Height : ");
double W = YacineReadLine("Enter You Width : ");
double S = H*W*0.5;
Console.Write("Your Triangle Area is : ");
Console.Write(S);
Console.ReadKey();
}
// Yacine this is called Method it has string as Input and double as Output
double YacineReadLine(string message)
{
Console.Write(message);
string X = Console.ReadLine();
double Y = double.Parse(X);
return Y;//Output value must be double
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment