using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApp1 { class Program { static int Suma(int[] dane) { int suma = 0; for (int i = 0; i < dane.Length; i++) { suma += dane[i]; } return suma; } static void Main(string[] args) { //int[] dane = new int[5]; //dane[0] = 12; //dane[1] = 34; //dane[2] = -56; //dane[3] = -78; //dane[4] = 90; //foreach (var x in dane) //{ // Console.WriteLine(x); //} //for (int i = 0; i < dane.Length; i++) //{ // Console.WriteLine(dane[i]); //} //Console.WriteLine("Suma danych to: " + Suma(dane)); //Console.ReadKey(); //int[,] macierz = new int[3, 3]; //foreach (var x in macierz) //{ // Console.SetCursorPosition(x % 3, x / 3); // Console.WriteLine(x + " "); //} uczen uczen1; Console.WriteLine("Podaj dane:"); Console.Write("Imie :"); uczen1.imie = Console.ReadLine(); Console.Write("Nazwisko :"); uczen1.nazwisko = Console.ReadLine(); Console.Write("E-mail :"); uczen1.email = Console.ReadLine(); Console.Write("Wiek :"); uczen1.wiek = int.Parse(Console.ReadLine()); Console.WriteLine(uczen1.imie + " " + uczen1.nazwisko); uczen[] klasa1m = new uczen[25]; klasa1m[4].imie = ""; Console.ReadKey(); } } } using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApp1 { struct uczen { public string imie, nazwisko, email; public int wiek; } }