• Asignatura: Informática
  • Autor: ramirezfloresc27
  • hace 4 años

ordenar de manera ascendente 5 números en programa c++ cidigo
ayuda por favor


ramirezfloresc27: muchas grasias

Respuestas

Respuesta dada por: herlyvalles
1

#include <iostream>

using namespace std;

int main(int argc, char *argv[])

{

int x[4];

cout<<"ingresa los 5 numeros";

for(int y=0 ; y<=4 ; y++)

cin>>x[y];

for(int y=0 ; y<=4 ; y++)

cout<<x[y];

cout<<"\n";

for(int y=4 ; y>=0 ; y--)

cout<<x[y];

system("PAUSE");

return EXIT_SUCCESS;

}

Preguntas similares