Javascript making Grade Calculator 2.0 proj

me and my friend are lost doing our codes for this proj

  • (2 Pages)
  • +
  • 1
  • 2

21 Replies - 12122 Views - Last Post: 12 May 2010 - 04:01 PM

#1 cnampheonix  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 63
  • Joined: 03-December 09

Javascript making Grade Calculator 2.0 proj

Posted 15 December 2009 - 12:29 PM

Hi, im still a novice to programming and I need alot of help with my code.
Heres what our objective is:

This project is designed to give you practice using arrays in Javascript.
The Task

You are going to make some improvements to the grade calculator that you designed in Project 1. Rather than storing each of the grades in individual variables, you are going to use arrays to store your data. You should have an array for each of the different types of grades: homeworks, projects and exams. You are also going to error check the user input. You should use the function GetValidNumberInput() that you used in Project 3. You should have a function Average() that takes an array and returns the average of all the elements in the array.

More Details

* You must use for loops when dealing with the arrays (i.e. when you are reading the grades in from the user.)
* Correction! The only two functions you are required to use are GetValidNumberInput() and Average(). If you would like to create and use other functions, you are more than welcome to do so.
* The valid range for grades is 0 to 105.

**There are 3 homeworks , 4 projects, 3 exams
Homework is 4% each
Proj is 7 % each
Exam is 20% each

-----------------------------------------------------------------------------------------------------------------------

Also if its not too much trouble to ask, my friend also needs help with his code. He's finished a rough copy and sent it to me to check out, I was going to post it here for everyone to take a look at if they could give him some tips.
(he doesnt have an account and I told him it wasn't necessary to make one)

Here's his code ///// Im halfway through making a rough copy of my code and I will post it in a bit.
<script type="text/javascript">

var hwArray = new array[3];
var prjArray = new array[4];
var examArray = new array[3];

var hwAvg = 0;
var prjAvj = 0;
var examAvj = 0;

  For (int i=1; i=<3;i++){
  hwArray [i] = GetValidNumberInput("Enter the Homework score", 0 , 100);
   hwAvg = Avg(hw);
  alert("The final average is" +hwAvg); }
  
	For (int j=1; j=<4;j++){
prjArray [j] = GetValidNumberInput("Enter the Homework score", 0 , 100);
  prjAvg = Avg(prj);
  alert("he final average is" +prjAvg); }
  
	For (int k=1; k=<3;k++){
  examArray [k] = GetValidNumberInput("Enter the Homework score", 0 , 100);
  examAvg = Avg(exam);
  alert("The final average is" +examAvg); }
  
  
  function Avg(nums)
  {
	  Sum = 0;
	  for (int i = 0; i < nums.length; i++){
	  Sum += nums[i]
	  }
	  
  return Sum;
  }
  
  function GetValidNumberInput(promptString, lowerNum, upperNum)
  {
  var num = parseInt(prompt(promtString));
  while(isNaN (num)|| num < lowerNum || num > upperNum)
  {
	  alert(num + "is not an integer  between "
			  + lowerNum + "and " =upperNum);
	  num = parseInt(prompt(promptString));
	  }
	  return num;
	  }




here is the link to the homework site with full requirements and example screenshots
http://www.csee.umbc...ojects/p4.shtml

This post has been edited by cnampheonix: 15 December 2009 - 03:15 PM


Is This A Good Question/Topic? 0
  • +

Replies To: Javascript making Grade Calculator 2.0 proj

#2 Nykc  Icon User is offline

  • Gentleman of Leisure
  • member icon

Reputation: 729
  • View blog
  • Posts: 8,642
  • Joined: 14-September 07

Re: Javascript making Grade Calculator 2.0 proj

Posted 15 December 2009 - 12:40 PM

First off where is your code?

[rules][/rules]

Second, what are you asking for help with in regards to your friends code?

This post has been edited by Nykc: 15 December 2009 - 12:41 PM

Was This Post Helpful? 0
  • +
  • -

#3 cnampheonix  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 63
  • Joined: 03-December 09

Re: Javascript making Grade Calculator 2.0 proj

Posted 15 December 2009 - 12:44 PM

Im still working on my code, but I was hoping you guys could check out my friends code in the meantime, hes also working on the same proj so the rubric is the same one i posted above. I will finish a rough copy of my code and post it as soon as I can
Was This Post Helpful? 0
  • +
  • -

#4 Nykc  Icon User is offline

  • Gentleman of Leisure
  • member icon

Reputation: 729
  • View blog
  • Posts: 8,642
  • Joined: 14-September 07

Re: Javascript making Grade Calculator 2.0 proj

Posted 15 December 2009 - 01:03 PM

I guess you are overlooking the question. What errors are you having, what do you need help with? How is it broken? This way it makes it easier to assist you

This post has been edited by Nykc: 15 December 2009 - 01:03 PM

Was This Post Helpful? 0
  • +
  • -

#5 cnampheonix  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 63
  • Joined: 03-December 09

Re: Javascript making Grade Calculator 2.0 proj

Posted 15 December 2009 - 01:14 PM

Im not sure, his code looks funny to me with all the
var watnot = 0

but I guess more specifically Im not sure what hes trying to do in his functions
GetValidInput and Average

I think for his GetValidInput he's trying to
collect data all into 1 array?
I tried tinkering around and it still doesn't show up

and I have no idea what he tried to do to get the average
I was thinking something like (variable a /300 *12 (for the 3 hws)) + (variable b /400 *28 (for the 4 projs)) +(variable c /300 *60 (for the 3 exams))
= final grade
but it looks nothing like that

function Avg(nums)
  {
	  Sum = 0;
	  for (int i = 0; i < nums.length; i++){
	  Sum += nums[i]
	  }
	  
  return Sum;
  }


This post has been edited by cnampheonix: 15 December 2009 - 01:15 PM

Was This Post Helpful? 0
  • +
  • -

#6 cnampheonix  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 63
  • Joined: 03-December 09

Re: Javascript making Grade Calculator 2.0 proj

Posted 15 December 2009 - 01:27 PM

My apologize for bombarding you with alot of questions and info, but Im stuck on the array part for my code

I don't know how to get everything that looped in the "for loop" to be in 1 array
that way I can just add up everything in that array.

The thing is I also have to ask how many "whatever" (homeworks, projs, etc... ) are complete
From there I have to ask the score of each hw and put that all into 1 array
I think i should be editing somewhere around here
var i=0;
for (i=0;i<3;i++)
{
hw = GetValidInput("How many Homeworks are complete?, -1 to quit",-1);
 if (hw==-1)break;



heres my full code so far if you need to look at it
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>

<head>
	<script type="text/javascript">
	
	
	//For homework scores???//

function GetValidInput(promptString, sentinel)
			{
			   var input

				input = parseInt( prompt( promptString));
				if(input < -1 || isNaN(input))
				{

						alert("Not a valid number, Please enter 0 or higher.");
						input = GetValidInput(promptString, sentinel)
				}
										
				return input;
			}
			
 //You should have a function Average() that takes an array and //
 //returns the average of all the elements in the array. //
 
function average(homework,proj,exam)
	{


	}
</script>
<body>
<h1>  Grade Calculator v2.0 </h1>
<script type="text/javascript">

//INITIALIZATION//

var i=0;
for (i=0;i<3;i++)
{
hw = GetValidInput("How many Homeworks are complete?, -1 to quit",-1);
 if (hw==-1)break;
 
var i=0;
for (i=0;i<4;i++)
{
proj = GetValidInput("How many Projects are complete?, -1 to quit",-1);
 if (proj==-1)break;

var i=0;
for (i=0;i<3;i++)
{
exam = GetValidInput("How many Exams are complete?, -1 to quit",-1);
 if (exam==-1)break;
 

// Final Average and Grade//
alert ("Your Grade is " + Grade);
			
	if (Grade >= 90)
	{
		alert ("You got a A!");
	}
	else if (80 <= Grade && Grade <90)
	{
		alert ("You got a B!");
	}
	else if (70 <= Grade && Grade <80)
	{
		alert ("You got a C");
	}
	else if (60 <= Grade && Grade <70)
	{
		alert ("You got a D");
	}
	else if (0 <= Grade && Grade <60)
	{
		alert ("You got a F");
	}

</script>

</body>
</html>


Was This Post Helpful? 0
  • +
  • -

#7 cnampheonix  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 63
  • Joined: 03-December 09

Re: Javascript making Grade Calculator 2.0 proj

Posted 15 December 2009 - 07:48 PM

Hello..
I tried working and tinkering around with my code
I haven't finished the average to get the grade yet
However even without finishing that part I can't get my code to work
Nothing pops up and there is no indication of error on the error console
Can someone point out why?
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<body>
<h1>  Grade Calculator v2.0 </h1>
<head>
	<script type="text/javascript">
	
	
	//Gathering scores//

function GetValidInput(promptString, sentinel)
			{
			   var input

				input = parseInt( prompt( promptString));
				if(input < -1 || isNaN(input) || input > 106)
				{

						alert("Not a valid number, Please enter a number between 0 and 105.");
						input = GetValidInput(promptString, sentinel)
				}
										
				return input;
			}
			
 //You should have a function Average() that takes an array and //
 //returns the average of all the elements in the array. //
 
function average(number)
  {
	  Sum = 0;
	  for (int i = 0; i < number.length; i++){
	  Sum += number[i]
	  }
	  
  return Sum;
  }



//INITIALIZATION//

var hw = new Array();
for (i=0;i<3;i++)
{
hw(i) = GetValidInput("Enter your homework score, -1 to quit");
 if (hw==-1)break;
}
 
average(hw);

var proj = new Array();
for (i=0;i<4;i++)
{
proj(i) = GetValidInput("Enter your project score, -1 to quit");
 if (proj==-1)break;
}

average(proj);

var proj = new Array ();
for (i=0;i<3;i++)
{
exam(i) = GetValidInput("Enter your exam score, -1 to quit");
 if (exam==-1)break;
}

average(exam);

//calculation of all averages into final average//


// Final Average and Grade//

Grade = average(hw,proj,exam);


alert ("Your Grade is " + Grade);
			
	if (Grade >= 90)
	{
		alert ("You got a A!");
	}
	else if (80 <= Grade && Grade <90)
	{
		alert ("You got a B!");
	}
	else if (70 <= Grade && Grade <80)
	{
		alert ("You got a C");
	}
	else if (60 <= Grade && Grade <70)
	{
		alert ("You got a D");
	}
	else if (0 <= Grade && Grade <60)
	{
		alert ("You got a F");
	}

</script>

</body>
</html>


Was This Post Helpful? 0
  • +
  • -

#8 hiddenghost  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 39
  • View blog
  • Posts: 621
  • Joined: 15-December 09

Re: Javascript making Grade Calculator 2.0 proj

Posted 16 December 2009 - 01:31 PM

View Postcnampheonix, on 15 Dec, 2009 - 06:48 PM, said:

Hello..
I tried working and tinkering around with my code
I haven't finished the average to get the grade yet
However even without finishing that part I can't get my code to work
Nothing pops up and there is no indication of error on the error console
Can someone point out why?
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<body>
<h1>  Grade Calculator v2.0 </h1>
<head>
	<script type="text/javascript">
	
	
	//Gathering scores//

function GetValidInput(promptString, sentinel)
			{
			   var input

				input = parseInt( prompt( promptString));
				if(input < -1 || isNaN(input) || input > 106)
				{

						alert("Not a valid number, Please enter a number between 0 and 105.");
						input = GetValidInput(promptString, sentinel)
				}
										
				return input;
			}
			
 //You should have a function Average() that takes an array and //
 //returns the average of all the elements in the array. //
 
function average(number)
  {
	  Sum = 0;
	  for (int i = 0; i < number.length; i++){
	  Sum += number[i]
	  }
	  
  return Sum;
  }



//INITIALIZATION//

var hw = new Array();
for (i=0;i<3;i++)
{
hw(i) = GetValidInput("Enter your homework score, -1 to quit");
 if (hw==-1)break;
}
 
average(hw);

var proj = new Array();
for (i=0;i<4;i++)
{
proj(i) = GetValidInput("Enter your project score, -1 to quit");
 if (proj==-1)break;
}

average(proj);

var proj = new Array ();
for (i=0;i<3;i++)
{
exam(i) = GetValidInput("Enter your exam score, -1 to quit");
 if (exam==-1)break;
}

average(exam);

//calculation of all averages into final average//


// Final Average and Grade//

Grade = average(hw,proj,exam);


alert ("Your Grade is " + Grade);
			
	if (Grade >= 90)
	{
		alert ("You got a A!");
	}
	else if (80 <= Grade && Grade <90)
	{
		alert ("You got a B!");
	}
	else if (70 <= Grade && Grade <80)
	{
		alert ("You got a C");
	}
	else if (60 <= Grade && Grade <70)
	{
		alert ("You got a D");
	}
	else if (0 <= Grade && Grade <60)
	{
		alert ("You got a F");
	}

</script>

</body>
</html>



-----------------------------------------------

Try to test code a little at a time.
Write one or two functions at any one time and run them with "test code" that's specifically to test that new block of code.

Below I rewrote your elseif statements for the alert and made a "test block" of html with the h1 tag.
The h1 tag may not be in the final product, but you'll get to see if the one piece of code is working.
This way you'll be able to see what is wrong with your code early on so you're not sweating over why your code isn't doing anything.

See if you can try to alter the code below to fit in to your program. Try to keep it in working condition until you can test the other blocks of code.

Copy and paste the code into a text editor, save it, and open it in a web browser.
<html>
<head>
<title>Grade Me</title>
</head>
<body>
<!-- this h3 tag is to show that the function gradeTell works change the argument in gradeTell( argument ) to see it work -->
<h3 onclick = "gradeTell( '91' )">Click for grade</h3>
<script type = "text/javascript">
	function gradeTell( gradeGet ){
	var gradeAlert; // stores grade with average
		if ( gradeGet >= 90){ // use these if else to check the range of average then assign a grade letter to gradeAlert
			gradeAlert = "A!";
		}
		else if ( 80 <= gradeGet && gradeGet < 90){
			gradeAlert = "B!";
		}
		else if ( 70 <= gradeGet && gradeGet < 80){
			gradeAlert = "C";
		}
		else if ( 60 <= gradeGet && gradeGet < 70){
			gradeAlert = "D";
		}
		else{
			gradeAlert = "F";
		}
		var alertGrade = "Your Grade is " + gradeAlert; // store a string with the variable gradeAlert in alertGrade
		return alert ( alertGrade ) // return alertGrade in an alert box
	} // end function gradeTell
	
</script>

</body>
</html>




Some extra advice: If your code isn't in functions it will be interpreted starting from the top line then down from there.
Functions at the top are still seen first by the browser, but the functions can still be called in any order.
Code that's not in functions gets called in order from top to bottom of the page.

This post has been edited by hiddenghost: 16 December 2009 - 02:17 PM

Was This Post Helpful? 0
  • +
  • -

#9 cnampheonix  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 63
  • Joined: 03-December 09

Re: Javascript making Grade Calculator 2.0 proj

Posted 16 December 2009 - 01:48 PM

Funny thing i realized I didn't put in the end head </head>
When i did stuff started popping up on the error console again
So it looks like ill be able to find out my errors, but for now
Ill need to work on my greek studying since its a bit more of a priority. (finals this week )
Ill post up a revised code tomorrow for people to look at.
Thanks for all your help

Quote

Some extra advice: If your code isn't in functions it will be interpreted starting from the top line then down form there.
Functions at the top are still seen first by the browser, but the functions can still be called in any order.
Code that's not in functions gets called in order from top to bottom of the page.


this really cleared up some unanswered stupid questions I had

Thanks !

This post has been edited by cnampheonix: 16 December 2009 - 01:48 PM

Was This Post Helpful? 0
  • +
  • -

#10 hiddenghost  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 39
  • View blog
  • Posts: 621
  • Joined: 15-December 09

Re: Javascript making Grade Calculator 2.0 proj

Posted 16 December 2009 - 02:42 PM

Your welcome. :)

Tell your friend:
In the loops change "For()" to "for()" and the loops will be working.

Also tell your friend to write the code like this:
	for( loop ) {
		code to execute
	}


The above makes the code more readable so you or you're friend will be able to see mistakes easier.
Was This Post Helpful? 1
  • +
  • -

#11 JMRKER  Icon User is offline

  • D.I.C Addict

Reputation: 128
  • View blog
  • Posts: 828
  • Joined: 25-October 08

Re: Javascript making Grade Calculator 2.0 proj

Posted 16 December 2009 - 02:56 PM

In answer to your PM to me...

You have soooo many errors it's hard to know where to start!
Take a look at the following code, not line-by-line, but character-by-character.

Arrays are referenced by [] not ()
You cannot pass multiple values in a function that is expecting only ONE element.

More if you get lost....

Good Luck!
:)

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<body>
<h1>  Grade Calculator v2.0 </h1>
<head>
<script type="text/javascript">
// From: http://www.dreamincode.net/forums/index.php?showtopic=145679

// Gathering scores//
function GetValidInput(promptString, sentinel) {
  var input
  input = parseInt( prompt( promptString));
  if(input < -1 || isNaN(input) || input > 106) {
	alert("Not a valid number, Please enter a number between 0 and 105.");
	input = GetValidInput(promptString, sentinel)
  }
  return input;
}
		   
// You should have a function Average() that takes an array and //
// returns the average of all the elements in the array. //
 
function average(number) {
  Sum = 0;
  for (var i = 0; i < number.length; i++){
	Sum += number[i]
  }
  return (Sum/number.length);
}

//INITIALIZATION//
var hw = new Array();
for (var i=0;i<3;i++) {
  hw[i] = GetValidInput("Enter your homework score");
  if (hw[i]==-1)break;
}
var Homework = average(hw);

var proj = new Array();
for (var i=0;i<4;i++) {
  proj[i] = GetValidInput("Enter your project score");
  if (proj[i]==-1)break;
}
var Project = average(proj);

var exam = new Array ();
for (var i=0;i<3;i++) {
  exam[i] = GetValidInput("Enter your exam score");
  if (exam[i]==-1)break;
}
var Exam = average(exam);

// calculation of all averages into final average//
// Final Average and Grade//
Grade = average([Homework,Project,Exam]);

alert ("Your Grade is " + Grade);
if (Grade >= 90) { alert ("You got a A!"); } 
else {
  if (80 >= Grade) { alert ("You got a B!"); }
  else {
	if (70 >= Grade) { alert ("You got a C"); }
	else {
	  if (60 >= Grade) { alert ("You got a D"); }
	  else { alert ("You got a F"); }
	}
  }
}  
</script>

</body>
</html>


This post has been edited by JMRKER: 16 December 2009 - 02:57 PM

Was This Post Helpful? 1
  • +
  • -

#12 JMRKER  Icon User is offline

  • D.I.C Addict

Reputation: 128
  • View blog
  • Posts: 828
  • Joined: 25-October 08

Re: Javascript making Grade Calculator 2.0 proj

Posted 17 December 2009 - 07:47 AM

Response to your PM thanks ...
(could not respond via PM because either you have not set-up the PM reply or your box is full)

Anyway ...
You're most welcome.
Happy to help.
Good Luck!
:)
Was This Post Helpful? 0
  • +
  • -

#13 cnampheonix  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 63
  • Joined: 03-December 09

Re: Javascript making Grade Calculator 2.0 proj

Posted 17 December 2009 - 12:38 PM

Thanks again a huge bunch JMRKER and hiddenghost
Im really slow when it comes to programming ^^;
I was wondering if you could explain in detail what you meant by
the

Quote

Arrays are referenced by [] not ()
You cannot pass multiple values in a function that is expecting only ONE element.

Could you give me an example?

also I reworked my code with the stuff you gave me
I changed it so that the user could choose how many homeworks, etc.. he had
But i wanted to make it so it could error check
but after the error check it doesnt go back to asking how many hw's do you have?
So, I know its suppose to be a loop but how should I do that?

I only did the homework part first to see if it would work

 var amount = parseInt(prompt("How many homeworks do you have?"));
if(amount < 0 || isNaN(amount) || amount > 100) {
	alert("Not a valid number, Please enter correct amount");
  }
var hw = new Array();
for (var i=0;i<amount;i++) {
  hw[i] = GetValidInput("Enter your homework score, -1 to quit");
  if (hw[i]==-1)break;
}
var Homework = average(hw);


This post has been edited by cnampheonix: 17 December 2009 - 01:02 PM

Was This Post Helpful? 0
  • +
  • -

#14 JMRKER  Icon User is offline

  • D.I.C Addict

Reputation: 128
  • View blog
  • Posts: 828
  • Joined: 25-October 08

Re: Javascript making Grade Calculator 2.0 proj

Posted 17 December 2009 - 02:23 PM

Quote

Thanks again a huge bunch JMRKER and hiddenghost
Im really slow when it comes to programming happy.gif;
I was wondering if you could explain in detail what you meant by
the

Arrays are referenced by [] not ()
You cannot pass multiple values in a function that is expecting only ONE element.

Could you give me an example?


One thing at a time ...

Way back in post #8 you had this:
var hw = new Array();
for (i=0;i<3;i++)
{
hw(i) = GetValidInput("Enter your homework score, -1 to quit");
 if (hw==-1)break;
}
 
average(hw);


The variable 'hw' can be created as you have done with
var hw = new Array();
OR
var hw = [];
Either way is correct, but you cannot reference a single element in the hw array with hw(i).

Why ... because the access of an array element in JS is with [] not ().
The () is reserved to hold the parameters of a function so JS thinks you are calling a hw function with a parameter of i.
And you will get an error because you have not defined any function hw() anywhere.

Then you have a logic error in the for() loop;
You force it to do 3 prompt loops [0,1,2], but you allow the operator to then 'break' out of the loop by assigning (what would be the element if hw[i]) to a '-1' value. (but that does not happen in the original code).

This will lead to more errors:
1. You have not pre-initialized the hw grades if the user exits the prompt loop early
2. Any element of the hw array not assigned because the user entered -1 will be undefined.
3. When you force average the hw grades, you use 3 elements, all of which MAY not be assigned because of #2.
4. And one of the grades assigned in the hw example will be '-1' as part of your average.
Bummer of a grade!

Do you have a book on JS?
If not, get one.
If yes, review the sections related to the above explanation.
Then review the passing of parameters with a function, including how to return a calculation from a function. You will need that to understand how I used one 'average()' function to calculate the hw, project and exam grades.
This will answer the second question on your list.

Again from your earlier posts ...
function average(number)
  {
	  Sum = 0;
	  for (int i = 0; i < number.length; i++){
	  Sum += number[i]
	  }
	 
  return Sum;
  }


Your function 'average(hw)',
1. uses the hw array to calculate the average, but then it does nothing with it after being returned ... no write, no alert, no nothing!
2. expects an array in the definition because you are using 'number.length'. If it had been a single variable, you would get an error.

BTW: There is not 'int i = 0' assignment syntax in JS. This might be a carry over from some other language like java or BASIC or FORTRAN or ???, but not javascript.

Finally, look at the differences between your original code and the working example I provided.

Good Luck ... again.
:)
Was This Post Helpful? 0
  • +
  • -

#15 cnampheonix  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 63
  • Joined: 03-December 09

Re: Javascript making Grade Calculator 2.0 proj

Posted 17 December 2009 - 02:31 PM

Your the best JMRKER

Quote

The variable 'hw' can be created as you have done with
var hw = new Array();
OR
var hw = [];
Either way is correct, but you cannot reference a single element in the hw array with hw(i).


I thought that seemed off in my code, just wanted to make sure, I changed it now

Quote

1. You have not pre-initialized the hw grades if the user exits the prompt loop early


Would doing a return hw[i]
then doing the if hw==-1 break

fix this problem?
I think I get what your trying to say, by breaking out early the 3 elements in the array that are suppose to be calculated would potentialy become messed up, specially since I would also be putting in a -1 right?
GAH!! >.<


ah do you know any recommended books?

bah i just removed the -1 break thing
but i still wanna know how to fix it for future reference

This post has been edited by cnampheonix: 17 December 2009 - 02:52 PM

Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2