Posted by Adam on Monday, November 21, 2011 at 6:31pm.
var negatives =0;
var zeroes =0;
var positives=0 ;
switch (true )
case (array[i] == 0) :
case (array[i] > 0) :
case (array[i] < 0) :
return "Negatives = "+negatives+"\nZeroes = "+zeroes+"\nPositives = "+positives;
var myIntArray = new Array(10);
var num = prompt("Please enter a number","Please enter a number");
myIntArray[i] = parseInt(num);
var output = counter(myIntArray);
Answer this Question
More Related Questions
- Statistics - Joint probability density function is: x + y where 0<x<1 and ...
- Computer Science - Suppose X is a random variable and Y = aX + b is a linear ...