Advertisement
pranto_95

Lab 1

Sep 8th, 2015
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.48 KB | None | 0 0
  1. #include<iostream>
  2. using namespace std;
  3. int main(){
  4. int a,b,c;
  5. cout<<"Enter numbers\n";
  6. cin>>a>>b;
  7. if(a>b)
  8.     cout<<"The greater value is "<<a<<endl;
  9.     else
  10.         cout<<"The greater value is "<<b<<endl;
  11.         if(a>100)
  12.             if (a%2==0)
  13.         cout<<a<<"Even"<<endl;
  14.         else
  15.             cout<<a<<"Is Odd"<<endl;
  16.         if(b>100)
  17.             if(b%2==0)
  18.             cout<<b<<"Is Even"<<endl;
  19.         else
  20.             cout<<b<<"Is Odd"<<endl;
  21.  
  22.  
  23.  
  24.  
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement