thetallweeks
10/28/2013 - 4:38 AM

5-SimpleAdding.js

function SimpleAdding(num) { 
 
  var total = 0;
  for(i = 1; i <= num; i++) {
    total += i;
  }
  // code goes here  
  return total; 
         
}
   
// keep this function call here 
// to see how to enter arguments in JavaScript scroll down
SimpleAdding(readline());