mayap

ThirdDigit-GetCheck

Apr 11th, 2014
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.55 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ThirdDigit
  8. {
  9.     class ThirdDigit
  10.     {
  11.         static void Main()
  12.         {
  13.             int num = int.Parse(Console.ReadLine());
  14.          
  15.             int thirdDigit = num / 100 % 10;
  16.            
  17.             if (thirdDigit == 7)
  18.             {
  19.                 Console.WriteLine("True");
  20.             }
  21.             else
  22.             {
  23.                 Console.WriteLine("False");
  24.             }
  25.  
  26.         }
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment