some sec fixes
This commit is contained in:
@@ -35,7 +35,7 @@ namespace Lab
|
||||
long a = 1;
|
||||
long b = 1;
|
||||
List<long> list = new List<long>();
|
||||
while (a < n) { list.Add(a); long next = a + b; a = b; b = next; }
|
||||
while (a < n) { list.Add(a); if (long.MaxValue - a < b) break; long next = a + b; a = b; b = next; }
|
||||
|
||||
OutBox.Text = string.Join(", ", list);
|
||||
InfoText.Text = $"Найдено чисел: {list.Count}.";
|
||||
|
||||
Reference in New Issue
Block a user