iOS Swift assign variable value with conditional
<p>back in objective-c i can assign value of a variable with a result of conditional</p>

<p>EX : </p>

<pre><code>int b = 10
int c = 11
int a = b!=c ? 90 : 100;
</code></pre>

<p>But now on swift i cannot do that no more.</p>

<pre><code>var b = 10
var c = 11
var a = b &gt; c ? 90 : 100
</code></pre>

<p>the code above always highlight the <code>var a</code> line as error with desc : <code>Expected expression</code> with suggestion of adding <code>;</code></p>

<p>is there a way to assign variable with conditional with swift?</p>

<p>thanks!</p>