private static void Exercise5() { ConsoleAppPrintUtil.PrintTextWithLineSeparator("Ejercicio 5:"); var questions = new string[] { "Nº de valores a introducir:", "Valor" }; var countOfNumbers = ConsoleAppPrintUtil.PrintQuestionWithIntAnswerRecursive(questions[0]); var numbers = ConsoleAppUtil.GetArrayListOfNumbers(countOfNumbers); ConsoleAppPrintUtil.PrintText(GetExercise5Text(numbers)); }
private static void Exercise6() { ConsoleAppPrintUtil.PrintTextWithLineSeparator("Ejercicio 6:"); var questions = new string[] { "Nº de valores a introducir para cada serie:" }; var countOfNumbers = ConsoleAppPrintUtil.PrintQuestionWithIntAnswerRecursive(questions[0]); var numbersOfSerie1 = ConsoleAppUtil.GetArrayListOfNumbers(countOfNumbers, text: "Serie 1 > Valor"); var numbersOfSerie2 = ConsoleAppUtil.GetArrayListOfNumbers(countOfNumbers, text: "Serie 2 > Valor"); ConsoleAppPrintUtil.PrintText(GetExercise6Text(numbersOfSerie1, numbersOfSerie2)); }
private static void Exercise10() { ConsoleAppPrintUtil.PrintTextWithLineSeparator("Ejercicio 10:", useReadLine: false); ConsoleAppPrintUtil.PrintText("Introduzca 5 #s adicionales.", useConsoleClear: false); var numbers = new ArrayList(10) { 10, 20, 30, 40, 50, 60, 70, 80, 90, 100 }; var anotherFiveNumber = ConsoleAppUtil.GetArrayListOfNumbers(5, text: "# adicional"); numbers.InsertRange(10, anotherFiveNumber); numbers.Sort(); numbers.RemoveAt(7); ConsoleAppPrintUtil.PrintText(GetExercise10Text(numbers)); }