Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <iostream>
- #include <math.h>
- using namespace std;
- struct Aluno {
- string nome;
- float nota;
- int matricula;};
- int main (){
- int y = 50, i;
- Aluno x[5];
- for (i=0; i<5; i++) {
- cout << "Digite o nome: " << endl;
- cin >> x[i].nome;
- cout << "Digite a nota: " << endl;
- cin >> x[i].nota;
- cout << "Digite a matricula: " << endl;
- cin >> x[i].matricula;
- }
- for (i=0; i<5; i++) {
- cout << "Nome " <<i+1 << " :"<< x[i].nome <<endl;
- cout << "Nota " <<i+1 << " :"<< x[i].nota <<endl;
- cout << "Matricula " <<i+1 << " :"<< x[i].matricula <<endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment