Complete set: Intro to C - Bill Buchanan
Complete set: Intro to C - Bill Buchanan
Complete set: Intro to C - Bill Buchanan
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
4 is YELLOW<br />
5 is GREEN<br />
Program 3.3 uses an array of doubles which are initialized with certain values. It<br />
then uses a findSmallest() method <strong>to</strong> determine the lowest value. In this case the<br />
array (vals) is declared with seven elements (0 <strong>to</strong> 6).<br />
Program 3.3: Program3_3_ArrayInitializationNumeric<br />
using System;<br />
namespace ConsoleApplication2<br />
{<br />
class ArrayExample01<br />
{<br />
static double findSmallest(double[] v)<br />
{<br />
double smallest;<br />
smallest=v[0];<br />
for (int i=1; i