From 711f6ddaf85ba20a4f1b9e44b4d07f615454797c Mon Sep 17 00:00:00 2001 From: niklasBr <104077966+bretzNiklas@users.noreply.github.com> Date: Tue, 13 Dec 2022 10:47:03 +0100 Subject: [PATCH] added assert, input has to be 0 or greater --- Aufgabe3/ConsoleApplication1/Program.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Aufgabe3/ConsoleApplication1/Program.cs b/Aufgabe3/ConsoleApplication1/Program.cs index e9d6e7d..079df73 100644 --- a/Aufgabe3/ConsoleApplication1/Program.cs +++ b/Aufgabe3/ConsoleApplication1/Program.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Diagnostics; using System.Net.Mime; using System.Runtime.CompilerServices; using System.Runtime.Remoting.Messaging; @@ -29,6 +30,8 @@ namespace ConsoleApplication1 Console.WriteLine("Please provide two positive integers as program arguments"); Environment.Exit(1); } + + Debug.Assert(nrProd > -1 && nrCons > -1); -- GitLab