Skip to content

Instantly share code, notes, and snippets.

@ivanelson
Created December 15, 2018 03:02
Show Gist options
  • Save ivanelson/5a0945f80673b036dd73542ce5e36f10 to your computer and use it in GitHub Desktop.
Save ivanelson/5a0945f80673b036dd73542ce5e36f10 to your computer and use it in GitHub Desktop.
vetor em "C"
#include <stdio.h>
#include <stdlib.h>
int main () {
float notas[10];
int indice;
printf("Lendo as notas:\n");
for (indice = 0; indice < 10; indice++)
{
printf("Digite a nota do aluno: ");
scanf("%f", &notas[indice]);
}
printf("Exibindo as notas digitadas: \n");
for (indice = 0; indice < 10; indice++) {
printf("A nota %f foi armazenada na posicao %d do vetor.\n",notas[indice], indice);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment