Generation

generate functionMon, 19 Jun 2023

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

++ #include <iostream> int main() { int a, b; std::cout << "Introduce un valor: "; std::cin >> a; std::cout << "Introduce otro valor: "; std::cin >> b; for (int i = a; i <= b; i++) { if (i % 3 == 0 && i % 5 == 0) std::cout << i << std::endl; } return 0; }

Questions about programming?Chat with your personal AI assistant