From 360304de0102bda68a0663eb3fc1ff5debc2645f Mon Sep 17 00:00:00 2001 From: estlop Date: Mon, 4 Jul 2022 09:48:52 +0100 Subject: [PATCH] Add error handling when not a number as sugested --- subjects/sumthemall/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/subjects/sumthemall/README.md b/subjects/sumthemall/README.md index 03bb4f55..c72ca2b4 100644 --- a/subjects/sumthemall/README.md +++ b/subjects/sumthemall/README.md @@ -2,7 +2,7 @@ ### Instructions -Create a program that receives a number of arguments representing whole numbers and displays the sum of the total. If there are not enough arguments or there is an overflow display 0 followed by a new line. +Create a program that receives a number of arguments representing whole numbers and displays the sum of the total. If there are not enough arguments or there is an overflow display 0 followed by a new line. If the argument is not a number display 0. ### Usage @@ -11,4 +11,6 @@ $ go run . 23 34 53 | cat -e 110$ $ go run . 1000 2000 3000 4000 | cat -e 10000$ +$ go run . a | cat -e +0$ ```