Created
October 7, 2014 12:53
Revisions
-
IvanNikolov created this gist
Oct 7, 2014 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ using System; //Write a program that gets two numbers from the console and prints the greater of them. Try to implement this without if statements. Examples: //a b greater //5 6 6 //10 5 10 class NumberComparer { static void Main() { double a = double.Parse(Console.ReadLine()); double b = double.Parse(Console.ReadLine()); bool greater = (a > b); Console.WriteLine(greater? a : b); } }