for (int P = 1; P<=10;P++) { Console.WriteLine(P); } ------------------------------------------------ for (int P = 1; P<=10;P+=2) { Console.WriteLine(P); } ----------------------------------------------- for (int P = 1; P<=10;P++) { if (P%2==1) Console.WriteLine(P); } ----------------------------------------------- for (int P = 100; P>=10;P--) { Console.WriteLine(P); } ----------------------------------------------- int Zacatek = Int32.Parse(Console.ReadLine()); for (int P = Zacatek; P>=10;P--) { Console.WriteLine(P); } ---------------------------------------------- int Soucet = 0; for (int P = 1; P<=100;P++) { Soucet += P; } Console.WriteLine(Soucet); ---------------------------------------------- int Max = Int32.MinValue; int Zadana; for (int P = 1; P<=5;P++) { Zadana = Int32.Parse(Console.ReadLine()); if (Max < Zadana) Max = Zadana; } Console.WriteLine("Maximalni hodnota je: " + Max); ---------------------------------------------- int[] PoleCelychCisel = new int[10]; PoleCelychCisel[0] = 137; PoleCelychCisel[1] = 17; PoleCelychCisel[2] = 7; PoleCelychCisel[3] = 1; PoleCelychCisel[4] = 3; PoleCelychCisel[5] = 37; PoleCelychCisel[6] = 13; PoleCelychCisel[7] = 15; PoleCelychCisel[8] = 5; PoleCelychCisel[9] = 10; int Soucet = 0; for (int P = 0; P < PoleCelychCisel.Length; P++) Soucet += PoleCelychCisel[P]; Console.WriteLine(Soucet); Console.WriteLine(Soucet / PoleCelychCisel.Length); ------------------------------------------------ foreach (int Cislo in PoleCelychCisel) Console.WriteLine(Cislo); ------------------------------------------------ int Soucet = 0; foreach (int Cislo in PoleCelychCisel) Soucet += Cislo; Console.WriteLine(Soucet); Console.WriteLine(Soucet / PoleCelychCisel.Length);