Felhasználható:
Ágazati érettségi (CAD-CAM) és emeltszintű közismereti érettséginél
Felhasznált minta: 2022 Májusi Közismereti emelt
Forrás:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
namespace ConsoleApp7
{
internal class Program
{
static void Main(string[] args)
{
string[] sorok = File.ReadAllLines("utca.txt");
int[] adoszam=new int[sorok.Length-1];
string[] utca=new string[sorok.Length-1];
string[] hazszam=new string[sorok.Length-1];
string[] adobesorolas=new string[sorok.Length - 1];
int[] terulet=new int[sorok.Length-1];
string[] darabol = new string[5];
for (int i = 1; i < sorok.Length; i++)
{
darabol = sorok[i].Split(' ');
adoszam[i - 1] =Convert.ToInt32( darabol[0]);
utca[i - 1] = darabol[1];
hazszam[i - 1] = darabol[2];
adobesorolas[i-1] = darabol[3];
terulet[i - 1] =Convert.ToInt32( darabol[4]);
}
for (int i = 0; i < adoszam.Length; i++)
{
Console.WriteLine(adoszam[i]);
}
Console.WriteLine(adobesorolas.Length);
Console.WriteLine(sorok.Length-1);
Console.ReadLine();
}
}
}