theme changed

This commit is contained in:
nik
2025-09-30 08:21:09 +03:00
parent 4c261f7def
commit 8bd93df2ae
917 changed files with 15023 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
using System;
class ArithmeticProgression : IProgression
{
private int a0;
private int b;
public ArithmeticProgression(int a0, int b)
{
this.a0 = a0;
this.b = b;
}
public int GetElement(int k)
{
return a0 + (k - 1) * b;
}
public int Sum(int n)
{
return (2 * a0 + (n - 1) * b) * n / 2;
}
}

View File

@@ -0,0 +1,24 @@
using System;
class GeometricProgression : IProgression
{
private int p0;
private int q;
public GeometricProgression(int p0, int q)
{
this.p0 = p0;
this.q = q;
}
public int GetElement(int k)
{
return p0 * (int)Math.Pow(q, k - 1);
}
public int Sum(int n)
{
if (q == 1) return p0 * n;
return p0 * (int)((Math.Pow(q, n) - 1) / (q - 1));
}
}

View File

@@ -0,0 +1,7 @@
using System;
interface IProgression
{
int GetElement(int k);
int Sum(int n);
}

View File

@@ -0,0 +1,18 @@
using System;
public class Program
{
public static void Main(string[] args)
{
IProgression arith = new ArithmeticProgression(2, 3);
IProgression 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));
}
}

View File

@@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>

Binary file not shown.

View File

@@ -0,0 +1,23 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v9.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v9.0": {
"Progrssion/1.0.0": {
"runtime": {
"Progrssion.dll": {}
}
}
}
},
"libraries": {
"Progrssion/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
}
}
}

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,12 @@
{
"runtimeOptions": {
"tfm": "net9.0",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "9.0.0"
},
"configProperties": {
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
}
}
}

View File

@@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v9.0", FrameworkDisplayName = ".NET 9.0")]

View File

@@ -0,0 +1,22 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Progrssion")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+7c0cae85247e714f121496e471ff040abcdf0f0f")]
[assembly: System.Reflection.AssemblyProductAttribute("Progrssion")]
[assembly: System.Reflection.AssemblyTitleAttribute("Progrssion")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
// Generated by the MSBuild WriteCodeFragment class.

View File

@@ -0,0 +1 @@
50a88fde13001e552e5a15c4c1dc9d84bf377c2af97397458f32aa7bfb8ed0ce

View File

@@ -0,0 +1,15 @@
is_global = true
build_property.TargetFramework = net9.0
build_property.TargetPlatformMinVersion =
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = Progrssion
build_property.ProjectDir = /home/nik/oop/labs/lab8/Progrssion/
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =
build_property.EffectiveAnalysisLevelStyle = 9.0
build_property.EnableCodeStyleSeverity =

View File

@@ -0,0 +1,8 @@
// <auto-generated/>
global using global::System;
global using global::System.Collections.Generic;
global using global::System.IO;
global using global::System.Linq;
global using global::System.Net.Http;
global using global::System.Threading;
global using global::System.Threading.Tasks;

View File

@@ -0,0 +1 @@
febb35b45ae827ae2cc38bca29142b671a3067babd5d9854467e6c29a7f734b8

View File

@@ -0,0 +1,28 @@
/home/nik/oop/labs/lab7/Progrssion/bin/Debug/net9.0/Progrssion
/home/nik/oop/labs/lab7/Progrssion/bin/Debug/net9.0/Progrssion.deps.json
/home/nik/oop/labs/lab7/Progrssion/bin/Debug/net9.0/Progrssion.runtimeconfig.json
/home/nik/oop/labs/lab7/Progrssion/bin/Debug/net9.0/Progrssion.dll
/home/nik/oop/labs/lab7/Progrssion/bin/Debug/net9.0/Progrssion.pdb
/home/nik/oop/labs/lab7/Progrssion/obj/Debug/net9.0/Progrssion.GeneratedMSBuildEditorConfig.editorconfig
/home/nik/oop/labs/lab7/Progrssion/obj/Debug/net9.0/Progrssion.AssemblyInfoInputs.cache
/home/nik/oop/labs/lab7/Progrssion/obj/Debug/net9.0/Progrssion.AssemblyInfo.cs
/home/nik/oop/labs/lab7/Progrssion/obj/Debug/net9.0/Progrssion.csproj.CoreCompileInputs.cache
/home/nik/oop/labs/lab7/Progrssion/obj/Debug/net9.0/Progrssion.dll
/home/nik/oop/labs/lab7/Progrssion/obj/Debug/net9.0/refint/Progrssion.dll
/home/nik/oop/labs/lab7/Progrssion/obj/Debug/net9.0/Progrssion.pdb
/home/nik/oop/labs/lab7/Progrssion/obj/Debug/net9.0/Progrssion.genruntimeconfig.cache
/home/nik/oop/labs/lab7/Progrssion/obj/Debug/net9.0/ref/Progrssion.dll
/home/nik/oop/labs/lab8/Progrssion/obj/Debug/net9.0/Progrssion.GeneratedMSBuildEditorConfig.editorconfig
/home/nik/oop/labs/lab8/Progrssion/obj/Debug/net9.0/Progrssion.AssemblyInfoInputs.cache
/home/nik/oop/labs/lab8/Progrssion/obj/Debug/net9.0/Progrssion.AssemblyInfo.cs
/home/nik/oop/labs/lab8/Progrssion/obj/Debug/net9.0/Progrssion.csproj.CoreCompileInputs.cache
/home/nik/oop/labs/lab8/Progrssion/obj/Debug/net9.0/Progrssion.dll
/home/nik/oop/labs/lab8/Progrssion/obj/Debug/net9.0/refint/Progrssion.dll
/home/nik/oop/labs/lab8/Progrssion/obj/Debug/net9.0/Progrssion.pdb
/home/nik/oop/labs/lab8/Progrssion/bin/Debug/net9.0/Progrssion
/home/nik/oop/labs/lab8/Progrssion/bin/Debug/net9.0/Progrssion.deps.json
/home/nik/oop/labs/lab8/Progrssion/bin/Debug/net9.0/Progrssion.runtimeconfig.json
/home/nik/oop/labs/lab8/Progrssion/bin/Debug/net9.0/Progrssion.dll
/home/nik/oop/labs/lab8/Progrssion/bin/Debug/net9.0/Progrssion.pdb
/home/nik/oop/labs/lab8/Progrssion/obj/Debug/net9.0/Progrssion.genruntimeconfig.cache
/home/nik/oop/labs/lab8/Progrssion/obj/Debug/net9.0/ref/Progrssion.dll

Binary file not shown.

View File

@@ -0,0 +1 @@
b9720ec9fc833a3887df304a58803c131b5c329c227cb6c752c6888eb7c287f6

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,73 @@
{
"format": 1,
"restore": {
"/home/nik/oop/labs/lab8/Progrssion/Progrssion.csproj": {}
},
"projects": {
"/home/nik/oop/labs/lab8/Progrssion/Progrssion.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "/home/nik/oop/labs/lab8/Progrssion/Progrssion.csproj",
"projectName": "Progrssion",
"projectPath": "/home/nik/oop/labs/lab8/Progrssion/Progrssion.csproj",
"packagesPath": "/home/nik/.nuget/packages/",
"outputPath": "/home/nik/oop/labs/lab8/Progrssion/obj/",
"projectStyle": "PackageReference",
"configFilePaths": [
"/home/nik/.nuget/NuGet/NuGet.Config"
],
"originalTargetFrameworks": [
"net9.0"
],
"sources": {
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"net9.0": {
"targetAlias": "net9.0",
"projectReferences": {}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
},
"restoreAuditProperties": {
"enableAudit": "true",
"auditLevel": "low",
"auditMode": "direct"
},
"SdkAnalysisLevel": "9.0.100"
},
"frameworks": {
"net9.0": {
"targetAlias": "net9.0",
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48",
"net481"
],
"assetTargetFallback": true,
"warn": true,
"downloadDependencies": [
{
"name": "Microsoft.AspNetCore.App.Ref",
"version": "[9.0.9, 9.0.9]"
}
],
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "/usr/share/dotnet/sdk/9.0.110/PortableRuntimeIdentifierGraph.json"
}
}
}
}
}

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">/home/nik/.nuget/packages/</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">/home/nik/.nuget/packages/</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.12.4</NuGetToolVersion>
</PropertyGroup>
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<SourceRoot Include="/home/nik/.nuget/packages/" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />

View File

@@ -0,0 +1,78 @@
{
"version": 3,
"targets": {
"net9.0": {}
},
"libraries": {},
"projectFileDependencyGroups": {
"net9.0": []
},
"packageFolders": {
"/home/nik/.nuget/packages/": {}
},
"project": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "/home/nik/oop/labs/lab8/Progrssion/Progrssion.csproj",
"projectName": "Progrssion",
"projectPath": "/home/nik/oop/labs/lab8/Progrssion/Progrssion.csproj",
"packagesPath": "/home/nik/.nuget/packages/",
"outputPath": "/home/nik/oop/labs/lab8/Progrssion/obj/",
"projectStyle": "PackageReference",
"configFilePaths": [
"/home/nik/.nuget/NuGet/NuGet.Config"
],
"originalTargetFrameworks": [
"net9.0"
],
"sources": {
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"net9.0": {
"targetAlias": "net9.0",
"projectReferences": {}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
},
"restoreAuditProperties": {
"enableAudit": "true",
"auditLevel": "low",
"auditMode": "direct"
},
"SdkAnalysisLevel": "9.0.100"
},
"frameworks": {
"net9.0": {
"targetAlias": "net9.0",
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48",
"net481"
],
"assetTargetFallback": true,
"warn": true,
"downloadDependencies": [
{
"name": "Microsoft.AspNetCore.App.Ref",
"version": "[9.0.9, 9.0.9]"
}
],
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "/usr/share/dotnet/sdk/9.0.110/PortableRuntimeIdentifierGraph.json"
}
}
}
}

View File

@@ -0,0 +1,10 @@
{
"version": 2,
"dgSpecHash": "+4R2gX25Pfg=",
"success": true,
"projectFilePath": "/home/nik/oop/labs/lab8/Progrssion/Progrssion.csproj",
"expectedPackageFiles": [
"/home/nik/.nuget/packages/microsoft.aspnetcore.app.ref/9.0.9/microsoft.aspnetcore.app.ref.9.0.9.nupkg.sha512"
],
"logs": []
}