Skip to content

Commit

Permalink
Added starter code.
Browse files Browse the repository at this point in the history
  • Loading branch information
sirius17 committed Jun 19, 2019
1 parent 87e954a commit 466faca
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .vs/Tavisca.Bootcamp.LanguageBasics.Exercise1/xs/UserPrefs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<Properties StartupConfiguration="{7668201A-A7B7-4EEB-A69B-1BC4E4B52328}|Default">
<MonoDevelop.Ide.Workbench ActiveDocument="Tavisca.Bootcamp.LanguageBasics.Exercise1/Program.cs">
<Files>
<File FileName="Tavisca.Bootcamp.LanguageBasics.Exercise1/Program.cs" Line="1" Column="1" />
</Files>
<Pads>
<Pad Id="ProjectPad">
<State name="__root__">
<Node name="Tavisca.Bootcamp.LanguageBasics.Exercise1" expanded="True">
<Node name="Tavisca.Bootcamp.LanguageBasics.Exercise1" expanded="True">
<Node name="Program.cs" selected="True" />
</Node>
</Node>
</State>
</Pad>
</Pads>
</MonoDevelop.Ide.Workbench>
<MonoDevelop.Ide.ItemProperties.Tavisca.Bootcamp.LanguageBasics.Exercise1 FirstBuild="True" PreferredExecutionTarget="MonoDevelop.Default" />
<MonoDevelop.Ide.DebuggingService.PinnedWatches />
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
<MonoDevelop.Ide.DebuggingService.Breakpoints>
<BreakpointStore />
</MonoDevelop.Ide.DebuggingService.Breakpoints>
<MultiItemStartupConfigurations />
</Properties>
17 changes: 17 additions & 0 deletions Tavisca.Bootcamp.LanguageBasics.Exercise1.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tavisca.Bootcamp.LanguageBasics.Exercise1", "Tavisca.Bootcamp.LanguageBasics.Exercise1\Tavisca.Bootcamp.LanguageBasics.Exercise1.csproj", "{7668201A-A7B7-4EEB-A69B-1BC4E4B52328}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{7668201A-A7B7-4EEB-A69B-1BC4E4B52328}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7668201A-A7B7-4EEB-A69B-1BC4E4B52328}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7668201A-A7B7-4EEB-A69B-1BC4E4B52328}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7668201A-A7B7-4EEB-A69B-1BC4E4B52328}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
28 changes: 28 additions & 0 deletions Tavisca.Bootcamp.LanguageBasics.Exercise1/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using System;

namespace Tavisca.Bootcamp.LanguageBasics.Exercise1
{
class Program
{
static void Main(string[] args)
{
Test("42*47=1?74", 9);
Test("4?*47=1974", 2);
Test("42*?7=1974", 4);
Test("42*?47=1974", -1);
Test("2*12?=247", -1);
}

private static void Test(string args, int expected)
{
var result = FindDigit(args).Equals(expected) ? "PASS" : "FAIL";
Console.WriteLine($"{args} : {result}");
}

public static int FindDigit(string equation)
{
// Add your code here.
throw new NotImplementedException();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.2</TargetFramework>
</PropertyGroup>

</Project>

0 comments on commit 466faca

Please sign in to comment.