Professional Documents
Culture Documents
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Queue<string> A = new Queue<string>();
Queue<string> B = new Queue<string>();
Queue<string> C = new Queue<string>();
Queue<string> D = new Queue<string>();
if (odeljenje == "2A")
{
A.Enqueue(substring);
}
if (odeljenje == "2B")
{
B.Enqueue(substring);
}
if (odeljenje == "2C")
{
C.Enqueue(substring);
}
if (odeljenje == "2D")
{
D.Enqueue(substring);
}
string a = A.Dequeue();
Console.WriteLine(a);
}
string b = B.Dequeue();
Console.WriteLine(b);
string c = C.Dequeue();
Console.WriteLine(c);
Console.ReadLine();
}
}
}
Zadatak 2.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
if (pol == "m")
{
muski[m] = substring;
m++;
if (pol == "z")
{
zenski[z] = substring;
z++;
Console.ReadLine();
}
}
}
Zadatak 3.
using System;
namespace treci_zadatak
{
internal class Program
{
int br = 0;
for (int i = 0; i < redova; i++)
{
string[] input = Console.ReadLine().Split();
for (int j = 0; j < kolona; j++)
{
polje[i, j] = int.Parse(input[j]);
if (x - 1 >= 0)
if (matrica[x - 1, y] == 0)
provera(matrica, n, m, x - 1, y);
if (x + 1 < n)
if (matrica[x + 1, y] == 0)
provera(matrica, n, m, x + 1, y);
if (y - 1 >= 0)
if (matrica[x, y - 1] == 0)
provera(matrica, n, m, x, y - 1);
if (y + 1 < m)
if (matrica[x, y + 1] == 0)
provera(matrica, n, m, x, y + 1);
}
}
}
Zadatak 4.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
string[] Prijatelji = {"Pera", "Mika", "Laza", "Janko", "Marko"};
int br= 1;
for (int i = 1; i <= Prijatelji.Length; i++)
{
br *= i;
}
Console.WriteLine("Broj mogucih kombinacija je: {0}", br);
}
}
}
}
}
}
}
}
}
Console.ReadLine();
}
}
}
2A_ZORAN
2D_MILE
2C_ZORA
2B_STEVA
2C_PERA
2D_ANA
2A_JOCA
2B_LAV
2B_IVA
2D_JANA
2C_BRANKO
2A_DRAGAN