Return C++ Java

Get Started. It's Free
or sign up with your email address
Return C++ Java by Mind Map: Return C++ Java

1. #include <iostream> #include <stdlib.h> using namespace std; struct cad { int matricula; float CR; }; cad Entrada(); /* * Protótipo da função Entrada sem parâmetro, * do Tipo cad que é um struct e com retorno. */ int main() { cad aluno; //Declaração de aluno aluno = Entrada();//A estrutura aluno recebe o retorno da função Entrada //Saida system("cls"); cout << "\nMatricula do aluno: " << aluno.matricula << "\tCR: " << aluno.CR; cout << "\n\n"; system("pause"); return 0; } cad Entrada() { cad temp; cout << "Matricula do aluno: "; cin >> temp.matricula; cin.get(); cout << "Digite CR: "; cin >> temp.CR; cin.get(); return temp; }

2. C:\Users\Eduardo\.clion10\system\cmake\generated\661a632c\661a632c\Debug\untitled12.exe Matricula do aluno: 100 Digite CR: 9 sh: cls: command not found Matricula do aluno: 100 CR: 9 sh: pause: command not found Process finished with exit code 0