Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as C by codigo ( 2 years ago )
#include <stdio.h>
#include <locale.h>
typedef struct{
int ra;
char nome[20]; //string
char nota_tipo1;
double nota_tipo2;
} Aluno;
void imprimir(Aluno al){
printf("\nOs seguintes dados foram cadastrados:\n");
printf("RA...: %d\n", al.ra);
printf("NOME.: %s\n", al.nome);
printf("NOTA1: %c\n", al.nota_tipo1);
printf("NOTA2: %.2lf\n", al.nota_tipo2);
}
int main(){
setlocale(LC_ALL,"Portuguese");
Aluno al;
printf("Digite o RA do aluno..: ");
scanf("%d", &al.ra);
printf("Digite o nome do aluno: ");
scanf(" %[^\n]", &al.nome);
printf("Digite a nota por letra: ");
scanf(" %c",&al.nota_tipo1);
printf("Digite a nota numérica.: ");
scanf("%lf",&al.nota_tipo2);
imprimir(al);
return 0;
}
Revise this Paste