• Source
    1. //Declarando funcion prototipo
    2. #include <iostream>
    3. using namespace std;
    4.  
    5. void impar(int x);
    6. void par (int x);
    7.  
    8. int main()
    9. {
    10. int i;
    11. do {
    12. cout<< "Por favor ingrese un numero(0 para continuar): ";
    13. cin >> i;
    14. impar(i);
    15. } while (i!=0);
    16. return 0;
    17. }
    18.  
    19. void impar(int x)
    20. {
    21. if((x%2)!=0) cout<<"Este es un numero impar.\n";
    22. else par(x);
    23. }
    24. void par(int x)
    25. {
    26. if ((x%2)==0) cout<<"Este es un numero par.\n";
    27. else impar(x);
    28. }