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 ConsoleApp2
- {
- class Program
- {
- static void Main(string[] args)
- {
- int n = 9;
- Random rand = new Random();
- int[,] arr = new int[n, n];
- for (int i = 0; i < n; i++)
- {
- for (int j = 0; j < n; j++)
- {
- arr[i, j] = rand.Next(50);
- }
- }
- for (int i = 0; i < n - 1; i++)
- {
- if (arr[1, i] % 3 == 0)
- Console.WriteLine(arr[1, i]);
- }
- for (int j = 0; j < n - 1; j++)
- {
- if (arr[1, j] % 3 == 0)
- Console.WriteLine(arr[1, j]);
- }
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement