Countdown by 7


I was asked to countdown from 100 by 7. I was having trouble doing it right, I ended up with 4 when I knew it should have been 2. this script shows it correctly.
 

 
 
<script type="text/javascript" language="JavaScript">
num=100;
while (num>=0)
{
document.write( "The number is " + num + "<br>");
num=num-7;
}
num2=100%7;
document.write( "The remainder is " + num2 + "<br>");
</script>