Created
April 18, 2018 07:26
-
-
Save pmikstacki/2bf3d10e7775a536254dd43ae23b0c39 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace ConsoleApp6 | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
string imie; | |
do | |
{ | |
Console.WriteLine("Podaj imię "); | |
imie = Console.ReadLine(); | |
} while (imie == String.Empty); | |
string nazwisko; | |
do | |
{ | |
Console.WriteLine("Podaj Nazwisko "); | |
nazwisko = Console.ReadLine(); | |
} while (nazwisko == String.Empty); | |
Console.WriteLine("podaj tytul ksiazki:"); | |
string ksiazka = Console.ReadLine(); | |
Console.WriteLine("Podaj date wypozyczenia: \n Rok:"); | |
int rok = int.Parse(Console.ReadLine()); | |
Console.WriteLine("Podaj miesiąc"); | |
int miesiac = int.Parse(Console.ReadLine()); | |
Console.WriteLine("Dzien"); | |
int dzien = int.Parse(Console.ReadLine()); | |
Czytelnik c =new Czytelnik(imie, nazwisko, new Ksiazka(ksiazka, new DateTime(rok, miesiac, dzien))); | |
Console.WriteLine($"Imie: {c.Imie} \n Nazwisko: {c.Nazwisko}"); | |
Console.WriteLine($"Tytuł: {c.KKsiazka.Tytul}, Data wypozyczenia: {c.KKsiazka.Data.ToString("yyyy-MMMM-dd")}"); | |
Console.ReadKey(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment