Answer the question
In order to leave comments, you need to log in
Structure student had a problem who can help?
#include <iostream>
#include <string>
#define n 5
using namespace std;
struct studik{
string FIO;
int ocenka[n];
int proverka;
float stepuha;
void getdata();
void setdata();
};
void studik::setdata(){
cout<<"вводим данные ешкин кошкин"<<endl;
cout<<"ФИО"<<endl;
getline(cin,FIO);
cin.ignore();
cout<<"оценки по математике,алгоритмам,психологии,физике,истории"<<endl;
for(int i=0;i<n;i++){
cin>>ocenka[i];
}
cout<<"степендия есть -1 нищий-2"<<endl;
cin>>proverka;
if(proverka==1){
cout<<"введите насколько богат студент"<<endl;
cin>>stepuha;
}
}
void studik::getdata(){
cout<<"выводим данные ешкин кошкин"<<endl;
cout<<"ФИО"<<FIO<<endl;
cout<<"оценки по математике,алгоритмам,психологии,физике,истории :"<<endl;
for(int i=0;i<n;i++){
cout<<ocenka[i]<<" ";}
cout<<endl;
if(proverka==1){
cout<<" сколько денег у буржуя"<<" "<<stepuha<<endl;
}
}
int main()
{
const int N = 2;
studik Student[N];
for (int i=0; i<N; i++) Student[i].setdata();
for (int i=0; i<N; i++) Student[i].getdata();
return 0;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question