Untitled
Never
using System; using System.Collections.Generic; namespace PESEL { class Program { protected static void Take_pesel(string t) { int number; List<long> lista_PESELI = new List<long>(); while (int.TryParse(t, out number) == false || (number > 100 || number <= 0)) { Console.WriteLine("Podałeś złą wartość. Podana liczba musi leżeć w przedziale od 1 do 100."); t = Console.ReadLine(); } for (int i = 0; i < number; i++) { string kolejne_pesele = Console.ReadLine(); long numer_pesel; while (long.TryParse(kolejne_pesele, out numer_pesel) == false || kolejne_pesele.Length != 11) { Console.WriteLine("Podany numer PESEL jest zbyt długi/krótki. PESEL składa się z 11 liczb. Wprowadź poprawny numer PESEL: "); kolejne_pesele = Console.ReadLine(); } lista_PESELI.Add(numer_pesel); } foreach (long p in lista_PESELI) { if (Check_pesel(p) == true) { Console.WriteLine("D"); } else { Console.WriteLine("N"); } } } protected static bool Check_pesel(long to_check) { int sum = 0; long constant = 13791379131; do { int x = (int)(constant % 10); int y = (int)(to_check % 10); sum += (x * y); constant /= 10; to_check /= 10; } while (constant > 0); if (sum == 0 || (sum % 10) == 0) { return true; } else { return false; } } static void Main(string[] args) { Console.WriteLine("Podaj ilość PESELi jaką chcesz sprawdzić: "); string t = Console.ReadLine(); Take_pesel(t); Console.ReadKey(); } } }
Raw Text
-
Untitled
10 sec ago
-
Dalawang Beses Nilabasan at Pinutukan ng Tamod sa Bibig si MsLady!
23 min ago
-
Adult Telegram Channels
49 min ago
-
Wicked - Kenzie Taylor's Crazy, Intense Fuck
53 min ago
-
https://twor.microsoftcrmportals.com/forums/support-forum/6cf2361f-8e00-ef11-a73d-6045bd3fd1cb
57 min ago
-
rtrtytud gdfxchjghj
1 hour ago
-
GIRLSWAY - Femdom Kira Noir Turns Biggest Fan Angela White Into A Sex Addict For Being A Bad Critic!
1 hour ago
-
Adult Telegram channels
1 hour ago
-
pejejeje
1 hour ago
-
Apply These 5 Secret Techniques To Improve Smart Hemp Gummies Canada
CSS | 1 hour ago