Not logged in. Log in with GitHub. About Websheets.

List of all available Websheets


Viewing cpp/cs102/lab2/expr3c by redekopp@usc.edu. You have unsaved changes. Log in above to create, edit, preview and publish Websheets.
PropertyValue
Description
html markup
shown to student
 
<p>Suppose <tt>x</tt>, <tt>y</tt>, and <tt>z</tt> are <strong><tt>int</tt></strong> variables and <tt>w</tt> and <tt>t</tt> are <strong><tt>double</tt></strong> variables.</p>  
<p>What value is assigned to the <strong>variable <tt>w</tt></strong> after the last statement executes (for a double place a <tt>.0</tt> after the integral portion if the fractional value is 0)?</p>
<code>
x = 23;<br>
y = 35;<br>
x = x + y / 4 - 3;<br>
z = x % 3;<br>
w = 28 / 3 + 6.5 * 2;<br>
t = x / 4.0 + 15 % 4 - 3.5;<br>
</code>
Remarks
Comments, history, license, etc.
 
Copied from problem cpp/cs102/lab2/expr3b (author: redekopp@usc.edu)
Copied from problem cpp/cs102/lab2/expr3a (author: redekopp@usc.edu)
Copied from problem cpp/cs102/lab2/expr2h (author: redekopp@usc.edu)
remove
Engine
Correct answer


Optional properties:

Note: problems are open-source by default (see 'Public permissions'). Assumed license for open problems is Creative Commons 4.0 Attribution-ShareAlike unless specified in 'Remarks'.