Assignments » Flow Of Control » Set 1 » Solution 1
#include <iostream> using namespace std; int main() { int a; cout<<"Enter any number : "; cin>>a; if(a%2==0) cout<<"The number is even"; else cout<<"The number is odd"; return 0; }
#include <iostream> using namespace std; int main() { int a; cout<<"Enter any number : "; cin>>a; if(a%2==0) cout<<"The number is even"; else cout<<"The number is odd"; return 0; }
The Output Is:
SAMPLE RUN # 1
Enter any number : 68
The number is even
SAMPLE RUN # 2
Enter any number : 43
The number is odd
Course Outline BSIT 2 year Program First Semester Outline Second Semester Outline Third Semester Outline ...
Post a Comment