Skip to content

Instantly share code, notes, and snippets.

@TranNgocMinh
Created February 4, 2018 06:33
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 TranNgocMinh/103f366479204c895c6bdd5b869bba06 to your computer and use it in GitHub Desktop.
Save TranNgocMinh/103f366479204c895c6bdd5b869bba06 to your computer and use it in GitHub Desktop.
class Program
{
static void Main(string[] args)
{
float a, b;
Console.WriteLine("Nhap a = ");
a = float.Parse(Console.ReadLine());
Console.WriteLine("Nhap b = ");
b = float.Parse(Console.ReadLine());
Console.WriteLine("So lon nhat la:" + Max(a,b));
Console.ReadKey();
}
public static float Max(float a, float b)
{
float max = 0;
if (a > b)
max = a;
else
max = b;
return max;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment