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;
- using System.Threading.Tasks;
- using System.IO;
- namespace ConsoleApplication6
- {
- class Program
- {
- static List<string> varos = new List<string>();
- static List<int> ev = new List<int>();
- static List<int> hossz = new List<int>();
- static List<string> bajnok = new List<string>();
- static void Main(string[] args)
- {
- StreamReader olvas = new StreamReader("verseny.txt", Encoding.Default);
- while(!olvas.EndOfStream)
- {
- string sor = olvas.ReadLine();
- string[] darab = sor.Split(';');
- varos.Add(darab[0]);
- ev.Add(Convert.ToInt32(darab[1]));
- hossz.Add(Convert.ToInt32(darab[2]));
- bajnok.Add(darab[3]);
- }
- olvas.Close();
- Feladat_2();
- Console.WriteLine();
- Feladat_3();
- Console.WriteLine();
- Feladat_4();
- Console.ReadKey();
- }
- static void Feladat_2()
- {
- Console.WriteLine("2.Feladat:");
- int min = ev[0];
- for(int i = 0; i < ev.Count; i++)
- {
- if(ev[i] < min)
- {
- min = ev[i];
- }
- }
- Console.WriteLine("Az első pályát " + min + "-ban adták át.");
- }
- static void Feladat_3()
- {
- Console.WriteLine("3.Feladat:");
- int max = hossz[0];
- int maxhely = 0;
- for(int i = 0; i < hossz.Count; i++)
- {
- if(hossz[i] > max)
- {
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement