Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

Calculator Exercise

Prerequisites

  • .NET 8 SDK

Build

From the repository root:

dotnet build calculator_exercise/calculator_exercise.csproj

Run

Pass an instruction-file path after --:

dotnet run --project calculator_exercise/calculator_exercise.csproj -- path/to/instructions.txt

Assumptions

  • Input is supplied in a .txt file, with one operator and one number on each non-empty line.
  • Numbers are parsed as decimal values using . as the decimal separator.
  • Operators are case-insensitive.
  • Blank lines and repeated whitespace are ignored.
  • apply must appear exactly once and only as the final instruction.
  • Invalid input, missing files, and division by zero produce a clear error message and a non-zero exit code.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages