Skip to content

Commit

Permalink
Update assignment project
Browse files Browse the repository at this point in the history
  • Loading branch information
PatZino committed Jun 6, 2024
1 parent d51e9d4 commit af6c9e8
Show file tree
Hide file tree
Showing 162 changed files with 8,331 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: .NET

on: [push, pull_request]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal
Binary file added .vs/CSharpBasics/v16/.suo
Binary file not shown.
Binary file added .vs/CSharpBasics/v17/.suo
Binary file not shown.
18 changes: 18 additions & 0 deletions Assignment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Assignment

## Task

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.

### Input

- An integer `n`.

### Output

- "Even" if `n` is even.
- "Odd" if `n` is odd.

### Example

#### Input
28 changes: 28 additions & 0 deletions CSharpBasics.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StudentSubmission", "StudentSubmission\StudentSubmission.csproj", "{029701A1-D937-4C0A-AEA3-757C8F0C1ABB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "Tests\Tests.csproj", "{D9AA0945-D94B-4ABF-B3EB-56735F38C516}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{029701A1-D937-4C0A-AEA3-757C8F0C1ABB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{029701A1-D937-4C0A-AEA3-757C8F0C1ABB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{029701A1-D937-4C0A-AEA3-757C8F0C1ABB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{029701A1-D937-4C0A-AEA3-757C8F0C1ABB}.Release|Any CPU.Build.0 = Release|Any CPU
{D9AA0945-D94B-4ABF-B3EB-56735F38C516}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D9AA0945-D94B-4ABF-B3EB-56735F38C516}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D9AA0945-D94B-4ABF-B3EB-56735F38C516}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D9AA0945-D94B-4ABF-B3EB-56735F38C516}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
23 changes: 23 additions & 0 deletions StudentSubmission/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using System;

namespace StudentSubmission
{
public class Program
{
public static void Main(string[] args)
{
// Read an integer from user input
int n = int.Parse(Console.ReadLine());

// Determine if the number is even or odd and print the result
if (n % 2 == 0)
{
Console.WriteLine("Even");
}
else
{
Console.WriteLine("Odd");
}
}
}
}
10 changes: 10 additions & 0 deletions StudentSubmission/StudentSubmission.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
23 changes: 23 additions & 0 deletions StudentSubmission/bin/Debug/net6.0/StudentSubmission.deps.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v6.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v6.0": {
"StudentSubmission/1.0.0": {
"runtime": {
"StudentSubmission.dll": {}
}
}
}
},
"libraries": {
"StudentSubmission/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
}
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"runtimeOptions": {
"tfm": "net6.0",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "6.0.0"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// 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("StudentSubmission")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+d51e9d46d633e93503897a9d13cf7d2ecd16d808")]
[assembly: System.Reflection.AssemblyProductAttribute("StudentSubmission")]
[assembly: System.Reflection.AssemblyTitleAttribute("StudentSubmission")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

// Generated by the MSBuild WriteCodeFragment class.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
63133df3de362d1de6a4a7f41471ad46c02f22a6de04375aef998bb1c847a2aa
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
is_global = true
build_property.TargetFramework = net6.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 = StudentSubmission
build_property.ProjectDir = C:\Projects\PMELimited\CSharpBasics\StudentSubmission\
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =
Original file line number Diff line number Diff line change
@@ -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;
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
627c4b9c26098614ebd5d21e3d1db2b533b94c47a17b5e3e239f1568c5007d11
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
C:\Projects\PMELimited\CSharpBasics\StudentSubmission\bin\Debug\net6.0\StudentSubmission.exe
C:\Projects\PMELimited\CSharpBasics\StudentSubmission\bin\Debug\net6.0\StudentSubmission.deps.json
C:\Projects\PMELimited\CSharpBasics\StudentSubmission\bin\Debug\net6.0\StudentSubmission.runtimeconfig.json
C:\Projects\PMELimited\CSharpBasics\StudentSubmission\bin\Debug\net6.0\StudentSubmission.dll
C:\Projects\PMELimited\CSharpBasics\StudentSubmission\bin\Debug\net6.0\StudentSubmission.pdb
C:\Projects\PMELimited\CSharpBasics\StudentSubmission\obj\Debug\net6.0\StudentSubmission.GeneratedMSBuildEditorConfig.editorconfig
C:\Projects\PMELimited\CSharpBasics\StudentSubmission\obj\Debug\net6.0\StudentSubmission.AssemblyInfoInputs.cache
C:\Projects\PMELimited\CSharpBasics\StudentSubmission\obj\Debug\net6.0\StudentSubmission.AssemblyInfo.cs
C:\Projects\PMELimited\CSharpBasics\StudentSubmission\obj\Debug\net6.0\StudentSubmission.csproj.CoreCompileInputs.cache
C:\Projects\PMELimited\CSharpBasics\StudentSubmission\obj\Debug\net6.0\StudentSubmission.sourcelink.json
C:\Projects\PMELimited\CSharpBasics\StudentSubmission\obj\Debug\net6.0\StudentSubmission.dll
C:\Projects\PMELimited\CSharpBasics\StudentSubmission\obj\Debug\net6.0\refint\StudentSubmission.dll
C:\Projects\PMELimited\CSharpBasics\StudentSubmission\obj\Debug\net6.0\StudentSubmission.pdb
C:\Projects\PMELimited\CSharpBasics\StudentSubmission\obj\Debug\net6.0\StudentSubmission.genruntimeconfig.cache
C:\Projects\PMELimited\CSharpBasics\StudentSubmission\obj\Debug\net6.0\ref\StudentSubmission.dll
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fdda71fd9eba437c074b64eeae7d95e8f293f06983138b02ec32d878deaaedcb
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"documents":{"C:\\Projects\\PMELimited\\CSharpBasics\\*":"https://raw.githubusercontent.com/ProgrammingMadeEasy-Community/CSharpBasics/d51e9d46d633e93503897a9d13cf7d2ecd16d808/*"}}
Binary file added StudentSubmission/obj/Debug/net6.0/apphost.exe
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// 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("StudentSubmission")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+d51e9d46d633e93503897a9d13cf7d2ecd16d808")]
[assembly: System.Reflection.AssemblyProductAttribute("StudentSubmission")]
[assembly: System.Reflection.AssemblyTitleAttribute("StudentSubmission")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

// Generated by the MSBuild WriteCodeFragment class.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
c2b65040c6438269d0151bf602ff8865d320c11596d40a7f258abf1052b990c7
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
is_global = true
build_property.TargetFramework = net6.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 = StudentSubmission
build_property.ProjectDir = C:\Projects\PMELimited\CSharpBasics\StudentSubmission\
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =
Original file line number Diff line number Diff line change
@@ -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;
73 changes: 73 additions & 0 deletions StudentSubmission/obj/StudentSubmission.csproj.nuget.dgspec.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{
"format": 1,
"restore": {
"C:\\Projects\\PMELimited\\CSharpBasics\\StudentSubmission\\StudentSubmission.csproj": {}
},
"projects": {
"C:\\Projects\\PMELimited\\CSharpBasics\\StudentSubmission\\StudentSubmission.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "C:\\Projects\\PMELimited\\CSharpBasics\\StudentSubmission\\StudentSubmission.csproj",
"projectName": "StudentSubmission",
"projectPath": "C:\\Projects\\PMELimited\\CSharpBasics\\StudentSubmission\\StudentSubmission.csproj",
"packagesPath": "C:\\Users\\user\\.nuget\\packages\\",
"outputPath": "C:\\Projects\\PMELimited\\CSharpBasics\\StudentSubmission\\obj\\",
"projectStyle": "PackageReference",
"fallbackFolders": [
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
],
"configFilePaths": [
"C:\\Users\\user\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
],
"originalTargetFrameworks": [
"net6.0"
],
"sources": {
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
"C:\\Program Files\\dotnet\\library-packs": {},
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"net6.0": {
"targetAlias": "net6.0",
"projectReferences": {}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
},
"restoreAuditProperties": {
"enableAudit": "true",
"auditLevel": "low",
"auditMode": "direct"
}
},
"frameworks": {
"net6.0": {
"targetAlias": "net6.0",
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48",
"net481"
],
"assetTargetFallback": true,
"warn": true,
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.202\\RuntimeIdentifierGraph.json"
}
}
}
}
}
16 changes: 16 additions & 0 deletions StudentSubmission/obj/StudentSubmission.csproj.nuget.g.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?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)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\user\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.9.2</NuGetToolVersion>
</PropertyGroup>
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<SourceRoot Include="C:\Users\user\.nuget\packages\" />
<SourceRoot Include="C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages\" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -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" />
Loading

0 comments on commit af6c9e8

Please sign in to comment.