fork download
  1. import std.stdio;
  2.  
  3.  
  4.  
  5. void main() {
  6.  
  7. int a = 0;
  8. writeln( a = (a < 10) ? 1 : 2 ); // prints 2
  9.  
  10.  
  11.  
  12. writeln( a = (a < 10) ? 1 : (2)); // prints 1
  13.  
  14. }
Success #stdin #stdout 0s 4096KB
stdin
Standard input is empty
stdout
1
1