Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.08 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace Hallgatok
  7. {
  8.     class tankor
  9.     {
  10.         public static void Main()
  11.         {
  12.             Console.Write("Bevitt diakok szama: ");
  13.             uint Hany = uint.Parse(Console.ReadLine());
  14.  
  15.             zh.hallgatok[] SokHallgato = new zh.hallgatok[Hany]; // memoriat lefoglaljuk a tombnek
  16.  
  17.             for (uint i = 0; i < SokHallgato.Length; ++i)
  18.             {
  19.                 Console.WriteLine("{}. hallgato adatai:", (i + 1));
  20.  
  21.                 string szak, neptun, osztondij;
  22.  
  23.                 Console.Write("\tSzak: ");
  24.                 szak = Console.ReadLine();
  25.  
  26.                 Console.Write("\tNeptun: ");
  27.                 neptun = Console.ReadLine();
  28.  
  29.                 Console.Write("Osztondij: ");
  30.                 osztondij = Console.ReadLine();
  31.  
  32.                 SokHallgato[i] = new zh.hallgatok(szak, neptun, osztondij); // tenyleges peldanyositunk 1 hallgatot
  33.  
  34.                 Console.WriteLine();
  35.             }
  36.             Console.ReadLine();a
  37.         }
  38.     }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement