Write a program in C++ to scan a number and identify whether it is even number of odd October 29, 2015 Get link Facebook X Pinterest Email Other Apps Write a program in C++ to scan a number and identify whether it is even number of odd # include <iostream> using namespace std; int main(){ int a, b; cout << "Enter Number" << endl; cin >> a; b = a % 2; if(b==0){ cout <<" Number is Even" << endl; } else { cout << "Number is odd" << endl; } system("Pause"); return 0; } Comments
Comments
Post a Comment