Untitled

                Never    
//Tokenizer function declarations
extern static void Tokenizer.start();
extern static String Tokenizer.nextTok();
extern static Number Tokenizer.getNum();

//List function declarations
extern static LinkedList LinkedList.createList(Number,LinkedList);
extern Number LinkedList.getHead();
extern LinkedList LinkedList.getList();
//First program 
class Main
{
private:    
    
public:
    //Main function
    static void main(Number argc, String[] argv)
    {
        Number currentVal; //current value.
        Number count;
        Number total;
        Number avg;
        Number stdDev;
        Number vs;
        Number s;
        Number m;
        Number l;
        Number vl;
        Number ovs;
        Number os;
        Number om;
        Number ol;
        Number ovl;
        
        LinkedList list, blank; //linked list and an empty list type
        //read in the numbers from IO to the list.
        Tokenizer.start();
        
        while(Tokenizer.nextTok()!="?")
        {
            currentVal=Tokenizer.getNum();
            Math.log(currentVal);
            list=LinkedList.createList(currentVal,list);
            count=count+1;
            total=total+currentVal;
        }
        if(count<2)
        {
            IO.printString("OOPS!\n");
            IO.exit(0);
        }
        //calculate average
        avg=total/count;
        //Calc standard deviation
        while(list!=blank)
        {
            currentVal=list.getHead();
            currentVal=currentVal-avg;
            currentVal=currentVal*currentVal;
            stdDev=stdDev+currentVal;
            list=list.getList();
        }
        stdDev=Math.sqrt(stdDev/(count-1));
        
        //calc natural logs. 
        vs=avg-2*stdDev;
        s=avg-stdDev;
        m=avg;
        l=avg+stdDev;
        vl=avg+2*stdDev;
        
        ovs=Math.pow(Math.e(),vs);
        os=Math.pow(Math.e(),s);
        om=Math.pow(Math.e(),m);
        ol=Math.pow(Math.e(),l);
        ovl=Math.pow(Mathe.(),vl);
        
        IO.printString("VS " + Math.toFixed(ovs)+"\n");
        IO.printString("S " + Math.toFixed(os)+"\n");
        IO.printString("M " + Math.toFixed(om)+"\n");
        IO.printString("L " + Math.toFixed(ol)+"\n");
        IO.printString("VL " + Math.toFixed(ovl)+"\n");
        return;
    }
}

        //calculate average
        avg=total/count;
        //Calc standard deviation
        while(list!=blank)
        {
            currentVal=list.getHead();
            currentVal=currentVal-avg;
            currentVal=currentVal*currentVal;
            stdDev=stdDev+currentVal;
            list=list.getList();
        }
        stdDev=Math.sqrt(stdDev/(count-1));
        
        //calc natural logs. 
        vs=avg-2*stdDev;
        s=avg-stdDev;
        m=avg;
        l=avg+stdDev;
        vl=avg+2*stdDev;
        
        ovs=Math.pow(Math.e(),vs);
        os=Math.pow(Math.e(),s);
        om=Math.pow(Math.e(),m);
        ol=Math.pow(Math.e(),l);
        ovl=Math.pow(Mathe.(),vl);
        
        IO.printString("VS " + Math.toFixed(ovs)+"\n");
        IO.printString("S " + Math.toFixed(os)+"\n");
        IO.printString("M " + Math.toFixed(om)+"\n");
        IO.printString("L " + Math.toFixed(ol)+"\n");
        IO.printString("VL " + Math.toFixed(ovl)+"\n");
        return;
    }
}