Skip to content

Commit af6c9e8

Browse files
committed
Update assignment project
1 parent d51e9d4 commit af6c9e8

File tree

162 files changed

+8331
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

162 files changed

+8331
-0
lines changed

.github/workflows/dotnet.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: .NET
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v2
12+
- name: Set up .NET
13+
uses: actions/setup-dotnet@v1
14+
with:
15+
dotnet-version: 6.0.x
16+
- name: Restore dependencies
17+
run: dotnet restore
18+
- name: Build
19+
run: dotnet build --no-restore
20+
- name: Test
21+
run: dotnet test --no-build --verbosity normal

.vs/CSharpBasics/v16/.suo

12 KB
Binary file not shown.

.vs/CSharpBasics/v17/.suo

12 KB
Binary file not shown.

Assignment.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Assignment
2+
3+
## Task
4+
5+
Write a program in C# that reads an integer from the user and prints "Even" if the number is even and "Odd" if the number is odd.
6+
7+
### Input
8+
9+
- An integer `n`.
10+
11+
### Output
12+
13+
- "Even" if `n` is even.
14+
- "Odd" if `n` is odd.
15+
16+
### Example
17+
18+
#### Input

CSharpBasics.sln

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.0.31903.59
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StudentSubmission", "StudentSubmission\StudentSubmission.csproj", "{029701A1-D937-4C0A-AEA3-757C8F0C1ABB}"
7+
EndProject
8+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "Tests\Tests.csproj", "{D9AA0945-D94B-4ABF-B3EB-56735F38C516}"
9+
EndProject
10+
Global
11+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
12+
Debug|Any CPU = Debug|Any CPU
13+
Release|Any CPU = Release|Any CPU
14+
EndGlobalSection
15+
GlobalSection(SolutionProperties) = preSolution
16+
HideSolutionNode = FALSE
17+
EndGlobalSection
18+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
19+
{029701A1-D937-4C0A-AEA3-757C8F0C1ABB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
20+
{029701A1-D937-4C0A-AEA3-757C8F0C1ABB}.Debug|Any CPU.Build.0 = Debug|Any CPU
21+
{029701A1-D937-4C0A-AEA3-757C8F0C1ABB}.Release|Any CPU.ActiveCfg = Release|Any CPU
22+
{029701A1-D937-4C0A-AEA3-757C8F0C1ABB}.Release|Any CPU.Build.0 = Release|Any CPU
23+
{D9AA0945-D94B-4ABF-B3EB-56735F38C516}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
24+
{D9AA0945-D94B-4ABF-B3EB-56735F38C516}.Debug|Any CPU.Build.0 = Debug|Any CPU
25+
{D9AA0945-D94B-4ABF-B3EB-56735F38C516}.Release|Any CPU.ActiveCfg = Release|Any CPU
26+
{D9AA0945-D94B-4ABF-B3EB-56735F38C516}.Release|Any CPU.Build.0 = Release|Any CPU
27+
EndGlobalSection
28+
EndGlobal

StudentSubmission/Program.cs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
using System;
2+
3+
namespace StudentSubmission
4+
{
5+
public class Program
6+
{
7+
public static void Main(string[] args)
8+
{
9+
// Read an integer from user input
10+
int n = int.Parse(Console.ReadLine());
11+
12+
// Determine if the number is even or odd and print the result
13+
if (n % 2 == 0)
14+
{
15+
Console.WriteLine("Even");
16+
}
17+
else
18+
{
19+
Console.WriteLine("Odd");
20+
}
21+
}
22+
}
23+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>net6.0</TargetFramework>
6+
<ImplicitUsings>enable</ImplicitUsings>
7+
<Nullable>enable</Nullable>
8+
</PropertyGroup>
9+
10+
</Project>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"runtimeTarget": {
3+
"name": ".NETCoreApp,Version=v6.0",
4+
"signature": ""
5+
},
6+
"compilationOptions": {},
7+
"targets": {
8+
".NETCoreApp,Version=v6.0": {
9+
"StudentSubmission/1.0.0": {
10+
"runtime": {
11+
"StudentSubmission.dll": {}
12+
}
13+
}
14+
}
15+
},
16+
"libraries": {
17+
"StudentSubmission/1.0.0": {
18+
"type": "project",
19+
"serviceable": false,
20+
"sha512": ""
21+
}
22+
}
23+
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"runtimeOptions": {
3+
"tfm": "net6.0",
4+
"framework": {
5+
"name": "Microsoft.NETCore.App",
6+
"version": "6.0.0"
7+
}
8+
}
9+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// <autogenerated />
2+
using System;
3+
using System.Reflection;
4+
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
//------------------------------------------------------------------------------
2+
// <auto-generated>
3+
// This code was generated by a tool.
4+
// Runtime Version:4.0.30319.42000
5+
//
6+
// Changes to this file may cause incorrect behavior and will be lost if
7+
// the code is regenerated.
8+
// </auto-generated>
9+
//------------------------------------------------------------------------------
10+
11+
using System;
12+
using System.Reflection;
13+
14+
[assembly: System.Reflection.AssemblyCompanyAttribute("StudentSubmission")]
15+
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
16+
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
17+
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+d51e9d46d633e93503897a9d13cf7d2ecd16d808")]
18+
[assembly: System.Reflection.AssemblyProductAttribute("StudentSubmission")]
19+
[assembly: System.Reflection.AssemblyTitleAttribute("StudentSubmission")]
20+
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
21+
22+
// Generated by the MSBuild WriteCodeFragment class.
23+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
63133df3de362d1de6a4a7f41471ad46c02f22a6de04375aef998bb1c847a2aa
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
is_global = true
2+
build_property.TargetFramework = net6.0
3+
build_property.TargetPlatformMinVersion =
4+
build_property.UsingMicrosoftNETSdkWeb =
5+
build_property.ProjectTypeGuids =
6+
build_property.InvariantGlobalization =
7+
build_property.PlatformNeutralAssembly =
8+
build_property.EnforceExtendedAnalyzerRules =
9+
build_property._SupportedPlatformList = Linux,macOS,Windows
10+
build_property.RootNamespace = StudentSubmission
11+
build_property.ProjectDir = C:\Projects\PMELimited\CSharpBasics\StudentSubmission\
12+
build_property.EnableComHosting =
13+
build_property.EnableGeneratedComInterfaceComImportInterop =
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// <auto-generated/>
2+
global using global::System;
3+
global using global::System.Collections.Generic;
4+
global using global::System.IO;
5+
global using global::System.Linq;
6+
global using global::System.Net.Http;
7+
global using global::System.Threading;
8+
global using global::System.Threading.Tasks;
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
627c4b9c26098614ebd5d21e3d1db2b533b94c47a17b5e3e239f1568c5007d11
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
C:\Projects\PMELimited\CSharpBasics\StudentSubmission\bin\Debug\net6.0\StudentSubmission.exe
2+
C:\Projects\PMELimited\CSharpBasics\StudentSubmission\bin\Debug\net6.0\StudentSubmission.deps.json
3+
C:\Projects\PMELimited\CSharpBasics\StudentSubmission\bin\Debug\net6.0\StudentSubmission.runtimeconfig.json
4+
C:\Projects\PMELimited\CSharpBasics\StudentSubmission\bin\Debug\net6.0\StudentSubmission.dll
5+
C:\Projects\PMELimited\CSharpBasics\StudentSubmission\bin\Debug\net6.0\StudentSubmission.pdb
6+
C:\Projects\PMELimited\CSharpBasics\StudentSubmission\obj\Debug\net6.0\StudentSubmission.GeneratedMSBuildEditorConfig.editorconfig
7+
C:\Projects\PMELimited\CSharpBasics\StudentSubmission\obj\Debug\net6.0\StudentSubmission.AssemblyInfoInputs.cache
8+
C:\Projects\PMELimited\CSharpBasics\StudentSubmission\obj\Debug\net6.0\StudentSubmission.AssemblyInfo.cs
9+
C:\Projects\PMELimited\CSharpBasics\StudentSubmission\obj\Debug\net6.0\StudentSubmission.csproj.CoreCompileInputs.cache
10+
C:\Projects\PMELimited\CSharpBasics\StudentSubmission\obj\Debug\net6.0\StudentSubmission.sourcelink.json
11+
C:\Projects\PMELimited\CSharpBasics\StudentSubmission\obj\Debug\net6.0\StudentSubmission.dll
12+
C:\Projects\PMELimited\CSharpBasics\StudentSubmission\obj\Debug\net6.0\refint\StudentSubmission.dll
13+
C:\Projects\PMELimited\CSharpBasics\StudentSubmission\obj\Debug\net6.0\StudentSubmission.pdb
14+
C:\Projects\PMELimited\CSharpBasics\StudentSubmission\obj\Debug\net6.0\StudentSubmission.genruntimeconfig.cache
15+
C:\Projects\PMELimited\CSharpBasics\StudentSubmission\obj\Debug\net6.0\ref\StudentSubmission.dll
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
fdda71fd9eba437c074b64eeae7d95e8f293f06983138b02ec32d878deaaedcb
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"documents":{"C:\\Projects\\PMELimited\\CSharpBasics\\*":"https://raw.githubusercontent.com/ProgrammingMadeEasy-Community/CSharpBasics/d51e9d46d633e93503897a9d13cf7d2ecd16d808/*"}}
146 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// <autogenerated />
2+
using System;
3+
using System.Reflection;
4+
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
//------------------------------------------------------------------------------
2+
// <auto-generated>
3+
// This code was generated by a tool.
4+
// Runtime Version:4.0.30319.42000
5+
//
6+
// Changes to this file may cause incorrect behavior and will be lost if
7+
// the code is regenerated.
8+
// </auto-generated>
9+
//------------------------------------------------------------------------------
10+
11+
using System;
12+
using System.Reflection;
13+
14+
[assembly: System.Reflection.AssemblyCompanyAttribute("StudentSubmission")]
15+
[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
16+
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
17+
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+d51e9d46d633e93503897a9d13cf7d2ecd16d808")]
18+
[assembly: System.Reflection.AssemblyProductAttribute("StudentSubmission")]
19+
[assembly: System.Reflection.AssemblyTitleAttribute("StudentSubmission")]
20+
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
21+
22+
// Generated by the MSBuild WriteCodeFragment class.
23+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
c2b65040c6438269d0151bf602ff8865d320c11596d40a7f258abf1052b990c7
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
is_global = true
2+
build_property.TargetFramework = net6.0
3+
build_property.TargetPlatformMinVersion =
4+
build_property.UsingMicrosoftNETSdkWeb =
5+
build_property.ProjectTypeGuids =
6+
build_property.InvariantGlobalization =
7+
build_property.PlatformNeutralAssembly =
8+
build_property.EnforceExtendedAnalyzerRules =
9+
build_property._SupportedPlatformList = Linux,macOS,Windows
10+
build_property.RootNamespace = StudentSubmission
11+
build_property.ProjectDir = C:\Projects\PMELimited\CSharpBasics\StudentSubmission\
12+
build_property.EnableComHosting =
13+
build_property.EnableGeneratedComInterfaceComImportInterop =
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// <auto-generated/>
2+
global using global::System;
3+
global using global::System.Collections.Generic;
4+
global using global::System.IO;
5+
global using global::System.Linq;
6+
global using global::System.Net.Http;
7+
global using global::System.Threading;
8+
global using global::System.Threading.Tasks;
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
{
2+
"format": 1,
3+
"restore": {
4+
"C:\\Projects\\PMELimited\\CSharpBasics\\StudentSubmission\\StudentSubmission.csproj": {}
5+
},
6+
"projects": {
7+
"C:\\Projects\\PMELimited\\CSharpBasics\\StudentSubmission\\StudentSubmission.csproj": {
8+
"version": "1.0.0",
9+
"restore": {
10+
"projectUniqueName": "C:\\Projects\\PMELimited\\CSharpBasics\\StudentSubmission\\StudentSubmission.csproj",
11+
"projectName": "StudentSubmission",
12+
"projectPath": "C:\\Projects\\PMELimited\\CSharpBasics\\StudentSubmission\\StudentSubmission.csproj",
13+
"packagesPath": "C:\\Users\\user\\.nuget\\packages\\",
14+
"outputPath": "C:\\Projects\\PMELimited\\CSharpBasics\\StudentSubmission\\obj\\",
15+
"projectStyle": "PackageReference",
16+
"fallbackFolders": [
17+
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
18+
],
19+
"configFilePaths": [
20+
"C:\\Users\\user\\AppData\\Roaming\\NuGet\\NuGet.Config",
21+
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
22+
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
23+
],
24+
"originalTargetFrameworks": [
25+
"net6.0"
26+
],
27+
"sources": {
28+
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
29+
"C:\\Program Files\\dotnet\\library-packs": {},
30+
"https://api.nuget.org/v3/index.json": {}
31+
},
32+
"frameworks": {
33+
"net6.0": {
34+
"targetAlias": "net6.0",
35+
"projectReferences": {}
36+
}
37+
},
38+
"warningProperties": {
39+
"warnAsError": [
40+
"NU1605"
41+
]
42+
},
43+
"restoreAuditProperties": {
44+
"enableAudit": "true",
45+
"auditLevel": "low",
46+
"auditMode": "direct"
47+
}
48+
},
49+
"frameworks": {
50+
"net6.0": {
51+
"targetAlias": "net6.0",
52+
"imports": [
53+
"net461",
54+
"net462",
55+
"net47",
56+
"net471",
57+
"net472",
58+
"net48",
59+
"net481"
60+
],
61+
"assetTargetFallback": true,
62+
"warn": true,
63+
"frameworkReferences": {
64+
"Microsoft.NETCore.App": {
65+
"privateAssets": "all"
66+
}
67+
},
68+
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.202\\RuntimeIdentifierGraph.json"
69+
}
70+
}
71+
}
72+
}
73+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="utf-8" standalone="no"?>
2+
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
4+
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
5+
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
6+
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
7+
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
8+
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\user\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages</NuGetPackageFolders>
9+
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
10+
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.9.2</NuGetToolVersion>
11+
</PropertyGroup>
12+
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
13+
<SourceRoot Include="C:\Users\user\.nuget\packages\" />
14+
<SourceRoot Include="C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages\" />
15+
</ItemGroup>
16+
</Project>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?xml version="1.0" encoding="utf-8" standalone="no"?>
2+
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />

0 commit comments

Comments
 (0)