<div>Hello CSI Class,</div><div><br></div>I received a question for 7 and 8 on the example exam.<br><div><br></div><div>For question 8, </div><div><a href="http://www.cs.kent.edu/~dforebac/classes/csi.su14/Examples/Structs/arrays.cpp">http://www.cs.kent.edu/~dforebac/classes/csi.su14/Examples/Structs/arrays.cpp</a> gives a good example on how to assign values to structure member variables. Also, if you took notes in class yesterday, you will have more examples. Additionally, the presentation <a href="http://vega.cs.kent.edu/~mikhail/classes/csi.s14/Slides/L15structs.ppt">http://vega.cs.kent.edu/~mikhail/classes/csi.s14/Slides/L15structs.ppt</a> contains more information. The link to more structure examples is <a href="http://www.cs.kent.edu/~dforebac/classes/csi.su14/Examples/Structs/">http://www.cs.kent.edu/~dforebac/classes/csi.su14/Examples/Structs/</a><br>
</div><div><br></div><div>For question 7, <a href="http://www.cs.kent.edu/~dforebac/classes/csi.su14/Examples/Arrays/fixedArray.cpp">http://www.cs.kent.edu/~dforebac/classes/csi.su14/Examples/Arrays/fixedArray.cpp</a> provides an example of iterating though an array to find the minimum value. To determine if an value exists in the array, the following snipet of code can be used.</div>
<br>int ar[5];<br>int valueToFind;<br><div>cout << "enter number to find ";</div><div>cin>> valueToFind;</div><div><br></div>bool found = false;<br><div>for ( int i=0; i <5; ++i)</div><div> if (ar[i] == valueToFind){</div>
<div> found = false;</div><div> break;</div><div> }</div><div><br></div>cout << found;<div><br></div><div>Kind Regards,</div><div>Dianne</div>