Advertisement
Guest User

Untitled

a guest
Jun 18th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. //Rextester.Program.Main is the entry point for your code. Don't change it.
  2. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5
  3.  
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Linq;
  7. using System.Text.RegularExpressions;
  8.  
  9. namespace Rextester
  10. {
  11. public class Program
  12. {
  13. public static void Main(string[] args)
  14. {
  15. int n = int.Parse(Console.ReadLine());
  16. string res = "FALSE";
  17. while (n>0) {
  18. int a = n % 10;
  19. if (a == 2)
  20. res = "TRUE";
  21. n = (int) n / 10;
  22. }
  23. Console.WriteLine(res);
  24. }
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement