Advertisement
Zapped

Even or odd: C++

May 9th, 2020
308
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.19 KB | None | 0 0
  1. #include<iostream>
  2. using namespace std;
  3. int main(){
  4.     int a;
  5.     cout<<"Inserta un número entero: ";cin>>a;
  6.     if(a%2==0){
  7.         cout<<"Es par";
  8.     }
  9.     else{
  10.         cout<<"Es impar";
  11.     }
  12.     return 0
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement