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 Elso
- {
- class Program
- {
- struct Egyhiányzás
- {
- public int hónap;
- public int nap;
- public string név;
- public string jelen;
- }
- static Egyhiányzás[] hiányzás = new Egyhiányzás[500];
- static int n = 0;
- struct Egystat
- {
- public string név;
- public int mulasztás;
- }
- static Egystat[] stat = new Egystat[50];
- static int m = 0;
- static void Main(string[] args)
- {
- Feladat1();
- }
- static void Feladat1()
- {
- StreamReader sr = new StreamReader("naplo.txt");
- string[] sor1 = new string[3];
- string[] sor2 = new string[3];
- while (sr.Peek() != -1)
- {
- sor1 = sr.ReadLine().Split(' ');
- while (sr.Peek() != -1 && sr.Peek() != '#')
- {
- sor2 = sr.ReadLine().Split(' ');
- hiányzás[n].hónap = Convert.ToInt32(sor1[1]);
- hiányzás[n].nap = Convert.ToInt32(sor1[2]);
- hiányzás[n].név = sor2[0] + " " + sor2[1];
- hiányzás[n].jelen = sor2[2];
- n++;
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement