I need your help i want to create a console app that accept 5 number and output the diff for that number. My challenge to this is test scenario for user input, please assist thanks. Below this what i have attempted to solve this, but it i must also find a way to create scenario for test cases and need some help please .
- using System;
-
- public class Program
- {
- public static void Main()
- {
- string[] seperators = {",", " ", ";", "."};
- int num2;
- Console.WriteLine("Input numbers over 10:");
-
- string[] splitArray = Console.ReadLine().Split(seperators, StringSplitOptions.RemoveEmptyEntries);
- foreach (string num in splitArray)
- {
-
- if(Int32.TryParse(num, out num2) == true)
- {
- if (num2 < 10)
- {
- Console.WriteLine(num + " is smaller than 10");
- }
- }
- else
- {
- Console.WriteLine(num + " is not a f***ing number...");
- }
- }
- }
-
- }