Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void Main()
- {
- Console.WriteLine("Enter a number to check if its third digit from right-to-left is 7:");
- int userNum = int.Parse(Console.ReadLine());
- bool isSeven = ((userNum / 100) % 10) == 7;
- Console.WriteLine(isSeven);
- }
Advertisement
Add Comment
Please, Sign In to add comment