Repository navigation
Expand file tree
/
Copy pathProgram.cs
More file actions
47 lines (40 loc) · 1.36 KB
/
Copy pathProgram.cs
File metadata and controls
47 lines (40 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
using System;
using System.Text.RegularExpressions;
//using HumanKode.Extensions;
namespace HelloWorld
{
class Program
{
static void Main(string[] args)
{
var patt = @"(?<nbr1>\w+)\s+(?<nbr2>\w+)";
Console.WriteLine("Les's First VSCode application.");
Console.WriteLine("Hello World!");
while (true)
{
Console.WriteLine("Enter number1 and nunber2 to multiply or just press Enter to exit.");
var line = Console.ReadLine();
if (string.IsNullOrWhiteSpace(line)) return;
var m = Regex.Match(line, patt);
if (!m.Success)
{
Console.WriteLine("Invalid input, enter 2 numberss.");
continue;
}
var result = HumanKode.Extensions.Math.Multiply(int.Parse(m.Groups["nbr1"].Value), int.Parse(m.Groups["nbr2"].Value));
Console.WriteLine("Result = " + result.ToString());
}
}
private void TestMethod()
{
// test code goes here.
// just testing, no code yet
//still no codee.....
// still none
//not yet
// this change made on branch1
// this change made on branch1 after it was merged into master
// monday 10:45am
}
}
}