Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (command.StartsWith("add"))
- {
- var commandParts = command.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
- if (commandParts.Length < 3)
- Console.WriteLine($"Wrong arguments count.");
- else
- {
- if (Complex.TryParse(commandParts[1], out Complex c1) &&
- Complex.TryParse(commandParts[2], out Complex c2))
- {
- var result = c1.Add(c2);
- Console.WriteLine(result.ToString());
- }
- }
- }
- else if
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement