two left
This commit is contained in:
18
labs/lab7_done/Progrssion/Program.cs
Normal file
18
labs/lab7_done/Progrssion/Program.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
|
||||
public class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
Progression arith = new ArithmeticProgression(2, 3);
|
||||
Progression geom = new GeometricProgression(2, 2);
|
||||
|
||||
Console.WriteLine("Арифметическая прогрессия:");
|
||||
Console.WriteLine("5-й элемент = " + arith.GetElement(5));
|
||||
Console.WriteLine("Сумма 5 элементов = " + arith.Sum(5));
|
||||
|
||||
Console.WriteLine("\nГеометрическая прогрессия:");
|
||||
Console.WriteLine("5-й элемент = " + geom.GetElement(5));
|
||||
Console.WriteLine("Сумма 5 элементов = " + geom.Sum(5));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user