Guest User

Untitled

a guest
Nov 24th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. /*Este program leera 10 numeros enteros y nos dira
  2. el mayor*/
  3. #include<iostream>
  4.  
  5. int main(){
  6. //definicion de variables
  7. int cont;
  8. int numero;
  9. int mayor;
  10. int salir;
  11. //bucle tipo for
  12. mayor=0;
  13. for(cont=1;cont<=10;cont++){
  14. std::cout<<"dime un numero entero:";
  15. std::cin>>numero;
  16. if(numero>mayor){
  17. mayor=numero;
  18. }
  19. }
  20.  
  21. std::cout<<"el mayor es"<<mayor;
  22. std::cout<<"toca cualquier tecla y dale a enter";
  23. std::cin>>salir;
  24. return 0;
  25.  
  26.  
  27.  
  28.  
  29. }
Add Comment
Please, Sign In to add comment