public static void Ejercicio7() { int n = EjerciciosExamen.ReadValue("Escriba el nĂºmero: "); int result = 0; for (int i = 0; i <= n; i++) { if ((i % 5) == 0) { result += i; } } System.Console.WriteLine(result); }
//Bandera japonesa public static void BanderaJaponesa() { for (int f = 0; f < 15; f++) { for (int c = 0; c < 70; c++) { if (f == 0 || f == 14 || c == 0 || c == 69) { System.Console.Write("*"); } else if (EjerciciosExamen.Distancia2D(35, 7, c, f) <= 5) { System.Console.Write("O"); } else { System.Console.Write(" "); } } System.Console.WriteLine(); } }