Advertisement
Guest User

Untitled

a guest
Feb 19th, 2020
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. using System;
  2.  
  3. namespace _04.Number1Till9ToText
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. int num = int.Parse(Console.ReadLine());
  10.  
  11. if (num == 1)
  12. {
  13. Console.WriteLine("one");
  14. }
  15. if (num == 2)
  16. {
  17. Console.WriteLine("two");
  18. }
  19. if (num == 3)
  20. {
  21. Console.WriteLine("three");
  22. }
  23. if (num == 4)
  24. {
  25. Console.WriteLine("four");
  26. }
  27. if (num == 5)
  28. {
  29. Console.WriteLine("five");
  30. }
  31. if (num == 6)
  32. {
  33. Console.WriteLine("six");
  34. }
  35. if (num == 7)
  36. {
  37. Console.WriteLine("seven");
  38. }
  39. if (num == 8)
  40. {
  41. Console.WriteLine("eight");
  42. }
  43. if (num == 9)
  44. {
  45. Console.WriteLine("nine");
  46. }
  47. if (num > 9)
  48. {
  49. Console.WriteLine("number too big");
  50. }
  51. }
  52. }
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement