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 ConsoleApp3
- {
- class Program
- {
- static void Main(string[] args)
- {
- int br = 0;
- int i, j, vs;
- int[,] array = new int[4, 4];
- for (i = 0; i < 4; i++)
- for (j = 0; j < 4; j++)
- array[i, j] = int.Parse(Console.ReadLine());
- for (i = 0; i < 4; i++)
- //1
- {
- for (j = 0; j < 4; j++)
- Console.Write(array[i, j] + " ");
- Console.WriteLine();
- }
- //2
- for (i = 0; i < 4; i++)
- {
- for (j = 0; j < 4; j++)
- {
- if (array[i, j] % 2 == 0)
- br++;
- }
- }
- Console.WriteLine("broqt na chetnite e " + br);
- //3
- for (i = 0; i < 4; i++)
- {
- for (j = 0; j < 4; j++)
- {
- if (array[i, j] > -5 && array[i, j] < 12)
- Console.Write(array[i, j] + " ");
- }
- }
- Console.WriteLine("diagonal2: ");
- //4
- for (i = 0; i < 4; i++)
- {
- Console.Write( array[i, 3 - i] + " ");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement