Guest User

Untitled

a guest
Oct 18th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. using System;
  2.  
  3. namespace ConsoleApplication1
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. string vastaus;
  10. int luku1;
  11. int luku2;
  12. Console.WriteLine("Anna 1. luku: ");
  13. luku1 = int.Parse(Console.ReadLine());
  14. Console.WriteLine("Anna 2. luku: ");
  15. luku2 = int.Parse(Console.ReadLine());
  16. vastaus = "";
  17.  
  18. if (luku1 < luku2)
  19. {
  20. vastaus = ("pienempi kuin");
  21. }
  22. else if (luku1 > luku2)
  23. {
  24. vastaus = ("suurempi kuin");
  25. }
  26. else if (luku1 == luku2)
  27. {
  28. vastaus = ("yhtäsuuri kuin");
  29. }
  30. Console.WriteLine("Ensimmäinen luku on {0} toinen luku ", vastaus);
  31. Console.ReadLine();
  32. }
  33. }
  34. }
Add Comment
Please, Sign In to add comment