Skip to content
Snippets Groups Projects
Commit 26f950d2 authored by Nicolas Mantilla Molina's avatar Nicolas Mantilla Molina
Browse files

Upload minimo comun multiplo

parent 39a69b4d
No related branches found
No related tags found
No related merge requests found
#include <iostream>
#include <cmath>
#include <fstream>
#include <vector>
using namespace std;
int main()
{
cout << "Calculadora del minimo común multiplo de dos numeros" << endl;
cout << "Ingrese el primer numero: ";
int a;
cin >> a;
cout << "Ingrese el segundo numero: ";
int b;
cin >> b;
int mcm;
int i = 1;
while (mcm == 0)
{
if (a*i % b == 0)
{
mcm = a*i;
}
i++;
}
cout << "El minimo comun multiplo de " << a << " y " << b << " es: " << mcm << endl;
}
\ No newline at end of file
File added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment