Created
June 29, 2022 16:44
-
-
Save johnaiker/738a4d009c2d70a04c48e9e12d1ba7cd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main() { | |
float numero1, numero2, multiplo, opcion; | |
int i; | |
do { | |
cout << "Inserte el primer numero: "; | |
cin >> numero1; | |
cout << endl << "Ahora inserte el segundo: "; | |
cin >> numero2; cout << endl; | |
cout << "- Los multiplos de " << numero1 << " menores que " << numero2 << " son: "; | |
for (i = 1; i <= numero2; i++) { | |
multiplo = numero1 * i; | |
if (multiplo >= numero2) { | |
break; | |
} | |
cout << endl << "- " << multiplo; | |
} | |
cout << endl << "Para ejecutar de nuevo inserte '1', sino escriba '0' " << endl; cin >> opcion; | |
system("cls"); | |
} while (opcion == 1); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment