Generation

generate functionSat, 15 Apr 2023

mostrarme los 3 numeros de mayor a menor

#include <iostream> using namespace std; int main() { int n1, n2, n3; cout << "Ingrese los numeros: " << endl; cin >> n1 >> n2 >> n3; if (n1 > n2 && n1 > n3) { cout << n1 << endl; if (n2 > n3) { cout << n2 << endl; cout << n3 << endl; } else { cout << n3 << endl; cout << n2 << endl; } } else if (n2 > n1 && n2 > n3) { cout << n2 << endl; if (n1 > n3) { cout << n1 << endl; cout << n3 << endl; } else { cout << n3 << endl; cout << n1 << endl; } } else { cout << n3 << endl

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