Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- typedef struct{
- float trab[4],prova[2];
- int matricula;
- }tipoaluno;
- int main (){
- tipoaluno aluno[3];
- int i,j;
- for(i=0; i<=2; i++){
- printf("Informe a matricula no %d aluno\n", i+1);
- scanf("%d", &aluno[i].matricula);
- for (j=0;j<4;j++){
- printf("Informe a nota do %d aluno no %d trabalho\n", i+1, j+1);
- scanf("%f", &aluno[i].trab[j]);
- }
- for (j=0;j<2;j++){
- printf("Informe a nota do %d aluno na %d prova\n", i+1, j+1);
- scanf("%f", &aluno[i].prova[j]);
- }
- }
- for (i=0;i<3;i++)
- printf("Teste: %d", aluno[i].matricula);
- return 0;
- }
Add Comment
Please, Sign In to add comment