Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class Program
- {
- static void Main(string[] args)
- {
- int[] numbers = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
- ShowEvenNumbers(numbers);
- }
- static void ShowEvenNumbers(int[] numbers)
- {
- for (int i = 0; i < numbers.Length; i++)
- {
- if (numbers[i] % 2 == 0)
- {
- Console.WriteLine(numbers[i]);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement