From eee5472033a26dae4138b7c6efd2b41dc80751b4 Mon Sep 17 00:00:00 2001 From: Geir Okkenhaug Jerstad Date: Thu, 14 Nov 2024 11:31:51 +0100 Subject: [PATCH] =?UTF-8?q?testing=20D=E2=99=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Emne 3/ConsoleApp3/ConsoleApp3/Program.cs | 26 ++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/Emne 3/ConsoleApp3/ConsoleApp3/Program.cs b/Emne 3/ConsoleApp3/ConsoleApp3/Program.cs index 85551be..78d2954 100644 --- a/Emne 3/ConsoleApp3/ConsoleApp3/Program.cs +++ b/Emne 3/ConsoleApp3/ConsoleApp3/Program.cs @@ -3,11 +3,27 @@ internal class Program { static void Main(string[] args) - { - int a = 3; - decimal b = 5; - decimal sum = a + b; - Console.WriteLine(sum); + { + Run(); + } + + public static decimal sum() + { + int a = 3; + decimal b = 5; + decimal sum = a + b; + return sum; + + } + private static decimal Sum(decimal a, decimal b) + { + return a + b; + } + + public static void Run() + { + Console.WriteLine(sum()); + Console.WriteLine(Sum(3,5)); } } } \ No newline at end of file