Ciao,
ho seguito il tuo consiglio e ho apportato delle modifiche al codice.
Adesso funziona bene.
codice:
<!-- Indovinare un numero -->
<html>
<head>
</head>
<body>
 <script language="javascript">
  var num, nc, i=1;
  document.write("Benventuto: Prova ad indovinare il numero tra 1 e 100 compresi</br></br>"); //Frase di benvenuto
  num=prompt("Inserire un numero: ");
  while(num<1 || num > 100) //Controllo sull'inserimento del numero
  {
   num=prompt("Il numero e' minore di 1 o maggiore di 100, reinseriscilo: ");
  }
  nc=Math.floor((Math.random()*100)+1); 
  while(num!=nc)
  { 
   if (num<nc)
    document.write("</br>Il numero e' piu\' grande di " +num);
   else
    document.write("</br> Il numero e' piu\' piccolo di " +num);
   num=prompt("Inserire un altro numero: ");
   i++; //Numero di tentativi
  }
  switch(i) 
  {
   case 1:
    document.write("</br>" +i+ " tentativo: Sniper");
    break;
   case 2:
   case 3:
   case 4:
    document.write("</br>" +i+ " tentativi: Not Bad");
    break;
   case 5:
   case 6:
   case 7:
   case 8:
   case 9:
   case 10:
    document.write("</br>" +i+ " tentativi: Insomma");
    break;
   default:
    document.write("</br>" +i+ " tentativi: No Comment");
  }
  document.write("</br></br> Il gioco e' finito.");
 </script>
<body>
</html>
Ciao e Grazie ancora.