var dwinteger=1;
var dwtotal=0;

do
  {
  dwinteger=dwinteger+2;
  dwtotal=dwtotal+dwinteger;
  }
while (dwinteger<=99);

var winteger=1;
var wtotal=0;

while (winteger<=100)
{
  winteger=winteger+1;
  wtotal=wtotal+winteger
}

function factorial()
{
var f_input=prompt("Calculate the factorial of:");
var total=1;
var counter=1;

for (counter=1;counter<=f_input;counter++)
{
total=total*counter;
}
alert("Factorial " + f_input + ": " + total + '\n' + '\n' + '\n' +
"Do - While loop: Sum of all odd numbers from: 1-100: " + dwtotal + '\n' + '\n' + '\n' + "While loop: Sum of all numbers from: 1-100: " + wtotal);
}