Advertisement
Guest User

Untitled

a guest
Feb 8th, 2016
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. Console.WriteLine("Input first number");
  2. string userInput1 = Console.ReadLine();
  3. int firstNumber = int.Parse(userInput1);
  4. Console.WriteLine("Input second number");
  5. string userInput2 = Console.ReadLine();
  6. int secondNumber = int.Parse(userInput2);
  7.  
  8. if (firstNumber > secondNumber)
  9. {
  10. Console.WriteLine(userInput1 + " is bigger than " + userInput2);
  11. }
  12. if (secondNumber > firstNumber)
  13. {
  14. Console.WriteLine(userInput2 + " is bigger than " + userInput1);
  15. }
  16. else
  17. {
  18. Console.WriteLine("Goodbye.");
  19. }
  20.  
  21.  
  22. Console.ReadLine();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement