#include <stdio.h>
#include <stdlib.h>

double Nota[10]; /* Notas de at 10 alunos */

int main(int argc, char *argv[])
{
  int Continuar = 1;     /*  Continuar  Verdadeiro */
  int Qtde_Notas = 0;    /*  Quantidade total de notas digitadas */
  int i;
  
  printf(">> Entrada de Dados <<\n\n");
  while ( Continuar  && Qtde_Notas < 10 )   
  {       
        printf ("Entre com a nota %d ou -1 para sair: ", Qtde_Notas);
        scanf ("%lf", &Nota[Qtde_Notas] );
        
        if  (Nota[Qtde_Notas]  !=  -1)
            Qtde_Notas ++;       /* Se nota for diferente de -1, atualiza quantidade */
        else  
            Continuar = 0;       /* Se nota for igual a -1, sai do lao */   
  }

  printf("\n\nDados fornecidos:\n\n");
  /* Exibe todas as notas que foram fornecidas */
  for (i=0; i < Qtde_Notas; i++)
      printf("Nota[%d] = %.2lf\n", i, Nota[i]);
  
  system("PAUSE");	
  return 0;
}
