Determine and print the smallest and largest values contained in 99-element floating-point array. Using notepad++, it doesn't give any errors. If something is wrong, it just won't show anything. This is what I have, but obviously not right. Any suggestions please?
var w = new Array ( 99 );
parseFloat (smallest) = 0;
parseFloat (largest) = 0;
for ( int i = 0; i , 99; ++i )
{
if w[i] < smallest
smallest = w[i];
if w[i] > largest
largest = w[i];
}
document.writeln( "The smallest number is: " + smallest);
document.writeln( "The largest number is: " + largest);