Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <conio.h>
- using namespace std;
- using namespace System;
- bool verificacion (int *numeros)
- {
- for (int i = 0; i <= 6 - 1; i++)
- {
- for (int j = i + 1; j < 6; j++)
- {
- if (numeros[i] > numeros[j])
- return false;
- }
- }
- return true;
- }
- int main ()
- {
- int *numeros;
- numeros = new int[6];
- for (int i = 0; i < 6; i++)
- {
- cout << "Ingrese el numero " << i << ": ";
- cin >> numeros[i];
- }
- if (verificacion(numeros))
- cout << "Los numeros estan en orden";
- else
- cout << "Los numeros estan en desorden";
- _getch();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement