Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <locale.h>
- using namespace std;
- int main (){
- struct tp_aluno{
- long int RA;
- string nome;
- float nota1,nota2;
- };
- tp_aluno alu;
- cout<<"RA do aluno: ";
- cin>>alu.RA;
- cout<<"Nome do aluno: ";
- cin.ignore();
- getline(cin, alu.nome);
- cout<<"Nota 1: ";
- cin>>alu.nota1;
- cout<<"Nota 2: ";
- cin>>alu.nota2;
- system("cls");
- cout<<"RA :"<<alu.RA<<endl;
- cout<<"Nome :"<<alu.nome<<endl;
- cout<<"Nota 1:"<<alu.nota1<<endl;
- cout<<"Nota 2:"<<alu.nota2<<endl;
- cout<<"Médio :"<<(alu.nota1+alu.nota2)/2<<endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement