#include #include 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; char resp[5]; printf(">> Entrada de Dados <<\n\n"); while ( Continuar && Qtde_Notas < 10 ) { printf ("Entre com a nota %d: ", Qtde_Notas); scanf ("%lf", &Nota[Qtde_Notas] ); Qtde_Notas ++; /* Atualiza quantidade de notas fornecidas */ printf ("Deseja continuar (s/n)? "); scanf ("%s",resp); if (resp[0]=='s' || resp[0]=='S') Continuar = 1; else Continuar = 0; } 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; }