Advertisement
idsystems

CPP_Practica38 - Par Impar

Jan 30th, 2012
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.45 KB | None | 0 0
  1. // Program: parimpar.cc
  2. // Author:  Yoan Pinzon
  3. // Date:    Agosto 30, 2006
  4.  
  5. #include <iostream>
  6.  
  7. using namespace std;
  8.  
  9. int main()
  10. {
  11.    int x;
  12.  
  13.    cout << "Par Impar" << endl;
  14.    cout << "=========" << endl;
  15.    
  16.    cout << "Entre un numero = "; cin >> x;
  17.  
  18.    if( x % 2 == 0 )
  19.    {
  20.       cout << "El numero " << x << " es PAR" << endl;
  21.    }
  22.    else
  23.    {
  24.       cout << "El numero " << x << " es IMPAR" << endl;
  25.    }
  26.  
  27.    return 0;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement