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 ConsoleApp16
- {
- class Program
- {
- static void Main(string[] args)
- {
- bool[,] tab = new bool[5, 8];
- int zap = 0;
- for (int i = 0; i < 5; i++)
- {
- for (int j = 0; j < 8; j++)
- {
- if ((i % 2 == 0))
- {
- if (j % 2 == 0)
- {
- tab[i, j] = true;
- }
- }
- else
- {
- tab[i, j] = false;
- }
- }
- }
- int licznik = 0;
- for (int i = 0; i < 5; i++)
- {
- for (int j = 0; j < 8; j++)
- {
- Console.WriteLine("Tab[{0},{1}] = {2}", i, j, tab[i, j]);
- }
- }
- //foreach (bool x in tab)
- //{
- // Console.WriteLine("{0} {1} ",licznik, x);
- // licznik++;
- //}
- Console.ReadKey();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement