Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void Main(string[] args)
- {
- int count = 0;
- int[] arr = new int[71];
- for (int i = 0; i < arr.Length; i++)
- {
- // כאן אתה מכניס מספרים
- arr[i]=int.Parse(Console.ReadLine());
- }
- for (int i = 0; i < arr.Length; i++)
- {
- // כאן אתה מדפיס את המספרים
- Console.WriteLine(arr[i]);
- }
- for (int i = 0; i < arr.Length; i++)
- {
- int num = arr[i],sum = 0;
- while (num > 0)
- {
- sum += num % 10;
- num = num / 10;
- }
- if (arr[i] % sum==0)
- count++;
- }
- Console.WriteLine("The number of the evarim is: " + count);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment