fork download
  1. #include<iostream>
  2. using namespace std;
  3. int main()
  4. {
  5. int a;
  6. string txt;
  7.  
  8. a = 10;
  9. txt = ((a>0) ? (/*true*/ "a jest większe od zera") : (/*false*/ "a nie jest dodatnie"));
  10. cout << txt << endl;
  11.  
  12. a = -10;
  13. txt = ((a>0) ? (/*true*/ "a jest większe od zera") : (/*false*/ "a nie jest dodatnie"));
  14. cout << txt << endl;
  15.  
  16. return 0;
  17. }
Success #stdin #stdout 0.02s 2856KB
stdin
Standard input is empty
stdout
a jest większe od zera
a nie jest dodatnie