#include<cstdlib>
using namespace std;
int main() {
int n;
int n1;
int n2;
float suma;
cout << "Ingrese un numero par " << endl;
cin >> n;
do {
n1 = (rand()%1000);
n2 = (rand()%1000);
suma = n1+n2;
if (suma==n) {
cout << n1 << endl;
cout << n2 << endl;
}
} while (n!=suma);
return 0;
}
No hay comentarios.:
Publicar un comentario