Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace ConsoleApplication1
- {
- class Program
- {
- static void Main(string[] args)
- {
- string[] tomb1 = new string[5] { "Jani", "Laci", "Lili", "Gábor", "Ádám" };
- string[] tomb2 = new string[5];
- Console.WriteLine("1.Jani\t2.Laci\t3.Lili\t4.Gábor\t5.Ádám");
- Console.WriteLine("FORMA: NEM/ÉÉ/HH/NN");
- int szemelyi = 0;
- string viszga = String.Empty;
- for (int i = 0; i < tomb2.Length; i++)
- {
- Console.Write("Add meg az {0}. személyi számot: ", i + 1);
- tomb2[i] = Console.ReadLine();
- }
- for (int i = 0; i < tomb2.Length; i++)
- {
- viszga = tomb2[i].Substring(0, 1);
- szemelyi = Convert.ToInt32(tomb2[i].Substring(3, 4));
- if (viszga != "2")
- if (321 > szemelyi && 219 < szemelyi)
- Console.WriteLine("{0} a halak jegyben született, ekkor: {1}", tomb1[i], szemelyi);
- else Console.WriteLine("{0} NEM született halaknak.",tomb1[i]);
- else Console.WriteLine("{0} NEM férfi.",tomb1[i]);
- }
- Console.ReadLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement