static void Main() { int i; ListaLeniwa list = new ListaLeniwa(); Console.WriteLine(list.element(10)); for (i = 1; i <= 10; i++) { Console.WriteLine(list.element(i)); } list.element(100); for (i = 5; i <= 40; i++) { Console.WriteLine("{0} element: {1}", i, list.element(i)); } Console.WriteLine("rozmiar listy leniwej: {0}", list.size()); Console.WriteLine(list.element(1)); Pierwsze p = new Pierwsze(); Console.WriteLine(p.size()); Console.WriteLine(p.element(1)); Console.WriteLine(p.element(0)); Console.WriteLine(p.element(4)); Console.WriteLine(p.element(3)); p.element(20); for (i = 1; i <= 30; i++) { Console.WriteLine("{0} liczba pierwsza = {1}", i, p.element(i)); } Console.WriteLine("rozmiar listy liczb pierwszych: {0}", p.size()); }
public static void Main() { Pierwsze P = new Pierwsze(); Console.WriteLine("Size {0}", P.size()); Console.WriteLine("Element 3: {0}", P.element(3)); Console.WriteLine("Size {0}", P.size()); Console.WriteLine("Element 100: {0}", P.element(100)); Console.WriteLine("Size {0}", P.size()); }
static void Main() { ListaLeniwa t = new ListaLeniwa(); Pierwsze p = new Pierwsze(); Console.WriteLine(t.element(40)); Console.WriteLine(t.size()); Console.WriteLine(t.element(15)); Console.WriteLine(t.size()); Console.WriteLine(p.element(30)); Console.WriteLine(p.size()); Console.WriteLine(p.element(15)); Console.WriteLine(p.size()); }
public static void Main() { ListaLeniwa lista = new ListaLeniwa(); Pierwsze lista2 = new Pierwsze(); Console.WriteLine(lista.liczba(40)); Console.WriteLine("Romiar listy: {0}", lista.size()); Console.WriteLine(lista.liczba(38)); Console.WriteLine("Romiar listy: {0}", lista.size()); Console.WriteLine(lista.liczba(42)); Console.WriteLine("Romiar listy: {0}", lista.size()); Console.WriteLine("Lista dla pierwszych"); Console.WriteLine(lista2.liczba(1)); Console.WriteLine("Romiar listy: {0}", lista2.size()); Console.WriteLine(lista2.liczba(2)); Console.WriteLine("Romiar listy: {0}", lista2.size()); Console.WriteLine(lista2.liczba(50)); Console.WriteLine("Romiar listy: {0}", lista2.size()); }
public static void Main() { ListaLeniwa list = new ListaLeniwa(); Pierwsze lista = new Pierwsze(); Console.WriteLine("rozmiar listy {0} ", list.size()); Console.WriteLine(list.element(40)); Console.WriteLine("rozmiar listy {0} ", list.size()); Console.WriteLine(list.element(20)); Console.WriteLine("rozmiar listy {0} ", list.size()); Console.WriteLine(list.element(20)); Console.WriteLine("Lista liczb pierwszych"); for (int i = 1; i <= 4; i++) { Console.WriteLine("rozmiar listy {0} ", lista.size()); Console.WriteLine(lista.element(i)); } Console.WriteLine(lista.element(1500)); Console.WriteLine("rozmiar listy {0} ", lista.size()); }
public static void Main(string[] args) { Console.WriteLine("\nTesting ListaLeniwa: \n"); ListaLeniwa lista; lista = new ListaLeniwa(); Console.WriteLine(lista.size()); Console.WriteLine("Add 10 elements"); Console.WriteLine(lista.element(10)); Console.WriteLine("Size: " + lista.size()); Console.WriteLine("Add 10 more elements"); Console.WriteLine(lista.element(20)); Console.WriteLine("Size: " + lista.size()); Console.WriteLine("Get 11th element"); Console.WriteLine(lista.element(11)); Console.WriteLine("Size: " + lista.size()); Console.WriteLine("\nTesting Pierwsze: \n"); Pierwsze pLista; pLista = new Pierwsze(); Console.WriteLine(pLista.size()); Console.WriteLine("Add 10th prime elements (" + pLista.getPrime(11) + ")"); Console.WriteLine(pLista.element(10)); Console.WriteLine("Size: " + pLista.size()); Console.WriteLine("Add 10th prime more elements (" + pLista.getPrime(11) + ")"); Console.WriteLine(pLista.element(20)); Console.WriteLine("Size: " + pLista.size()); Console.WriteLine("Get 11th prime element (" + pLista.getPrime(11) + ")"); Console.WriteLine(pLista.element(11)); Console.WriteLine("Size: " + pLista.size()); }
public static void Main(string[] args) { ListaLeniwa list = new ListaLeniwa(); Console.WriteLine(list.size()); Console.WriteLine(list.element(5)); for (int i = 0; i <= 5; i++) { Console.WriteLine(list.element(i)); } Pierwsze lista2 = new Pierwsze(); Console.WriteLine(lista2.size()); Console.WriteLine(lista2.element(5)); for (int i = 0; i <= 5; i++) { Console.WriteLine(lista2.element(i)); } }
static void Main(string[] args) { ListaLeniwa ps = new Pierwsze(); Console.WriteLine(ps.size()); Console.WriteLine(ps.element(1)); Console.WriteLine(ps.size()); Console.WriteLine(ps.element(2)); Console.WriteLine(ps.size()); Console.WriteLine(ps.element(3)); Console.WriteLine(ps.size()); Console.WriteLine(ps.element(1)); Console.WriteLine(ps.size()); Console.WriteLine(ps.element(4)); Console.WriteLine(ps.size()); Console.WriteLine(ps.element(2)); Console.WriteLine(ps.size()); }
public static void Main() { ListaLeniwa lista = new ListaLeniwa(); Console.WriteLine(lista.element(5)); Console.WriteLine(lista.element(42)); Console.WriteLine(lista.element(6)); Console.WriteLine(lista.element(17)); Console.WriteLine(lista.size()); Pierwsze pierwsze = new Pierwsze(); Console.WriteLine(pierwsze.element(1)); Console.WriteLine(pierwsze.element(2)); Console.WriteLine(pierwsze.element(3)); Console.WriteLine(pierwsze.element(47)); Console.WriteLine(pierwsze.element(10)); Console.WriteLine(pierwsze.element(15)); Console.WriteLine(pierwsze.size()); }