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 otszaz
- {
- class termek
- {
- public string f;
- public string t_as;
- }
- class Program
- {
- static void Main(string[] args)
- {
- StreamReader olvas = new StreamReader("penztar.txt",Encoding.Default);
- List<termek> nyugtak= new List<termek>();
- int q = 0;
- while (!olvas.EndOfStream)
- {
- string sor = olvas.ReadLine();
- string[] h = sor.Split(' ');
- nyugtak.Add(new termek());
- nyugtak[q].t_as = Convert.ToString(nyugtak[0]);
- if (q>1)
- {
- nyugtak[q].f = Convert.ToString(nyugtak[1]);
- }
- q++;
- }
- int fizetesek = 0;
- for (int i = 0; i < nyugtak.Count; i++)
- {
- if (nyugtak[i].f.StartsWith("F"))
- {
- fizetesek++;
- }
- }
- Console.WriteLine("2.Feladat");
- Console.WriteLine("Fizetesek szama:{0}",fizetesek);
- int elso = 0;
- for (int i = 0; i < nyugtak.Count; i++)
- {
- while (nyugtak[i].f.StartsWith("F"))
- {
- }
- }
- Console.WriteLine("3.Feladat");
- Console.ReadLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement