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 ConsoleApp20
- {
- class Program
- {
- static void Main(string[] args)
- {
- int i, j;
- 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());
- Console.WriteLine("otricatelni: ");
- for (i = 0; i < 4; i++)
- {
- for(j = 0; j < 4; j++)
- {
- if (array[i, j] < 0)
- Console.Write(array[i, j] + " ");
- }
- }
- Console.WriteLine("samo 0 : ");
- for ( i = 0; i<4; i++)
- for(j = 0; j <4; j++)
- {
- if (array[i, j] == 0)
- Console.Write(array[i, j] + " ");
- }
- Console.WriteLine("samo polojitelni: ");
- for (i = 0; i < 4; i++)
- {
- for (j = 0; j < 4; j++)
- {
- if (array[i, j] > 0)
- Console.Write(array[i, j] + " ");
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement