Advertisement
Guest User

ejercicio

a guest
Aug 19th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std ;
  4.  
  5. int main () {
  6.  
  7. int arreglo[5] ;
  8. int i ; //ciclo
  9. int numero ;
  10. int j ; //ciclo2
  11.  
  12. for (i=0; i <=4; i++) { //ciclo para la cantidad de numeros con el arreglo
  13.  
  14. cout << " Ingrese numero entero " ;
  15. cin >> arreglo[i] ;
  16.  
  17. }
  18. //hasta acรก todo bien, ahora empieza la segunda parte
  19. cout << " Ingrese numero " ;
  20. cin >> numero ;
  21.  
  22. for (j=0; j <=4 ; j++) {
  23.  
  24. if (arreglo[i] > numero) {
  25. cout << " El numero " << arreglo[i] << " es mayor a " << numero << endl ;
  26. }
  27.  
  28. else {
  29. }
  30.  
  31.  
  32. }
  33.  
  34.  
  35. return 0 ;
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement