Advertisement
Guest User

Untitled

a guest
Dec 8th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. public class Student
  2. {
  3. private string Imie { get; set; }
  4. private string Nazwisko { get; set; }
  5. private int NrIndeksu { get; set; }
  6. private string Uczelnia { get; set; }
  7.  
  8.  
  9. public Student()
  10. {
  11.  
  12. }
  13.  
  14. public void Dodaj()
  15. {
  16. Console.WriteLine("Imie: ");
  17. string imie = Console.ReadLine();
  18. Console.WriteLine("Nazwisko: ");
  19. string nazwisko = Console.ReadLine();
  20. Console.WriteLine("Nr Indeksu: ");
  21. int nrIndeksu = Console.Read();
  22. Console.WriteLine("Uczelnia: ");
  23. string uczelnia = Console.ReadLine();
  24.  
  25. Imie = imie;
  26. Nazwisko = nazwisko;
  27. NrIndeksu = nrIndeksu;
  28. Uczelnia = uczelnia;
  29.  
  30. }
  31.  
  32. public void Pokaz()
  33. {
  34. Console.WriteLine("Imię: " + Imie + " Nazwisko: " + Nazwisko);
  35. Console.WriteLine("Uczelnia: " + Uczelnia);
  36. Console.WriteLine("Nr Indeksu: " + NrIndeksu);
  37.  
  38. }
  39.  
  40.  
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement