Advertisement
Jambix64

EstruturaTernariaOpereadorCondicinal

Aug 8th, 2016
1,272
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. using namespace std;
  3. #define num1 500
  4. #define num2 600
  5. int main()
  6. {
  7.  
  8.   num1<num2 ? cout<<"Sim "<<num1<<" e menor"<<" que "<<num2<<" !" : cout<<"Nao e menor"<<endl;
  9.    int res;
  10.   num1<num2 ? (res = 10) : (res =0);
  11.   cout<<endl;
  12.   cout<<res<<endl;
  13.    return 0;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement