C#- using System;
- using System.IO;
- using System.Linq;
- using System.Collections.Generic;
-
- class Program
- {
- static void Main()
- {
- string[] lines = File.ReadAllLines("data.txt");
-
-
- var newLines = lines.ToList();
-
- // 去掉标题
- newLines.RemoveRange(0, 1);
- // int SkipSomeLines = 1;
- // newLines.RemoveAll(
- // ParameterAbandonment =>
- // {
- // SkipSomeLines--;
- // if (SkipSomeLines >= 0)
- // {
- // return true;
- // }
- // else
- // {
- // return false;
- // }
- // }
- // );
-
- var MaxScore =
- from line in newLines
- let each = line.Split(new string[] {" "}, StringSplitOptions.RemoveEmptyEntries)
- where Convert.ToDouble(each[6]) > 50
- select line;
-
- foreach (var n in MaxScore)
- {
- Console.WriteLine(n);
- }
-
- Console.ReadLine();
- }
- }
复制代码
- A0107 V1 MB PASS 36.422462 31.122015 57.230366 0 0 0 20.807903
- A0403 V1 MB BRIDGE 36.514278 31.15177 62.486103 0 0 0 25.971825
复制代码
|