Generation

generate functionMon, 19 Jun 2023

Mostrar todos los # múltiplos de 3 y 5 entre rango de 2 valores solicitados por pantalla

# static void Main(string[] args) { int a, b, i, j; Console.WriteLine("Enter a number: "); a = Int32.Parse(Console.ReadLine()); Console.WriteLine("Enter another number: "); b = Int32.Parse(Console.ReadLine()); Console.WriteLine("The multiples of 3 and/or 5 are:"); for (i = a; i <= b; i++) { if (i % 3 == 0 && i % 5 == 0) Console.WriteLine(i); } Console.Read(); }

Want to kickstart your project?Use the new AI Studio to create your code