Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApplication33
- {
- class Program
- {
- static void Main(string[] args)
- {
- int num;
- int dig;
- int wow;
- int wowl;
- int din = 0;
- int aor;
- for (aor = 1; aor <= 30; aor++)
- {
- Console.WriteLine("Please enter a number.");
- num = int.Parse(Console.ReadLine());
- Console.WriteLine("Please enter a digit.");
- dig = int.Parse(Console.ReadLine());
- wow = num;
- while (wow > 0)
- {
- wow /= 10;
- wowl = wow % 10;
- if (wowl == dig)
- {
- din++;
- }
- if (din < 0)
- {
- Console.WriteLine("The digit appears in the number.");
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement