Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- struct data{
- int dia,mes,ano;
- };
- struct aluno{
- int codigo,dia,mes,ano;
- char nome[50];
- double notas[5][2];
- };
- //Função para registrar Alunos;
- void inclusao(){
- int i=0,j,k;
- printf("Codigo do aluno:\n");
- scanf("%d",&c[i].codigo);
- getchar();
- printf("Nome do aluno:\n");
- gets(c[i].nome);
- printf("Data de nascimento:\n");
- scanf("%d %d %d",&c[i].dia,c[i].mes,c[i].ano);
- //for para ler as notas;
- for(k=0;k<5;k++){
- for(j=0;j<2;j++){
- Printf("Nota da materia %d e da prova %d:\n",k,j);
- scanf("%lf",&c[i].notas[k][j]);
- }
- }
- i++;
- }
- int main (){
- int x;
- struct data var[10];
- struct aluno c[10];
- printf("1 Inclusao:\n");
- printf("2 Consulta:\n");
- printf("3 Alteracao:\n");
- printf("4 Exclusao de aluno:\n");
- scanf("%d",&x);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement