braulio_holtz

Untitled

Nov 11th, 2013
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.27 KB | None | 0 0
  1. string teste(int no=0)
  2. {
  3.     if ((no%2)==0)
  4.     {
  5.         return "par";
  6.     }
  7.     else {
  8.         return "impar";
  9.     }
  10. }
  11. int main()
  12. {
  13.     int num=0;
  14.     cout << "Informe um numero inteiro" << endl;
  15.     cin >> num;  
  16.     cout << teste(num);
  17.     return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment