Advertisement
Guest User

validacion de numero

a guest
Apr 20th, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. #include <iostream>
  2. #include <conio.h>
  3.  
  4. using namespace std;
  5.  
  6. void validacion_numero() {
  7. int n;
  8.  
  9. do {
  10. cout << "Ingrese un numero del 8 al 12: ";
  11. cin >> n;
  12. } while (n < 8 || n > 12);
  13.  
  14. }
  15.  
  16.  
  17.  
  18. int main() {
  19.  
  20. validacion_numero();
  21.  
  22. _getch();
  23. return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement