https://docs.google.com/document/d/1uaCgD9nvjyhpG8gDEYpZYvFmetwnx6RACpfDHrTRVyg/edit
#include #include using namespace std; void beolvasas(vector &t); void feladat8(const vector t, int &db); bool volt(const int i, const vector t); int main(){ vector t; int db; beolvasas(t); feladat8(t, db); cout << db << " db kulonbozo tipus van!" << endl; return 0; } void beolvasas(vector &t){ int n; cout << "N="; cin >> n; t.resize(n); for(int i=0; i> t[i]; } } void feladat8(const vector t, int &db){ db=0; int n = t.size(); for(int i=0; it){ int j=0; while(j
#include #include #include using namespace std; void beolvasas(vector > &t); void fel5(const vector > t, int &hol); double osszeg(const int i, const vector > t); int main(){ vector > t; int hol; beolvasas(t); fel5(t, hol); cout << hol << ". a legnagyobb!" << endl; return 0; } void beolvasas(vector > &t){ int n; ifstream ifs("be.txt"); ifs >> n; t.resize(n); for(int i=0; i> t[i][j]; } } } void fel5(const vector > t, int &hol){ double max; int n = t.size(); hol = 0; max = osszeg(0, t);; for(int i=0; imax){ hol=i; max=osszeg(i, t); } } } double osszeg(const int i, const vector > t){ double s=0; for(int j=0;j