#include #include using namespace std; void beolvas(float h[], int); //int szamlal(float h[], int); //bool eldont(float h[], int); float atlag(float h[], int); int main() { /* //1. Hanyszor fordult elo, hogy ket egymas utani napon az atlaghomerseklet tobb mint 10 fokot valtozott? const int max=30; float h[max]; int db; int eredmeny; do { cout << "Adja meg a tomb elemszamat (1<=db<= "<> h[i]; } } float atlag(float h[], int db) { int darab=0; float osszeg=0; float atlag=0; for(int i=0; i10) darab++; return darab; } */ /////////////////////////// #include #include using namespace std; void beolvas(float h[], int); struct maximum { float ertek; int index; }; maximum maxker(float h[], int); int main() { //4. Add meg a legmagasabb homersekletu nap sorszamat es a maximumot const int max=30; float h[max]; //float adat[max]; int db, index; do { cout << "Adja meg a tomb elemszamat (1<=db<= "<>h[i]; } } maximum maxker(float h[], int db) { maximum m; m.ertek=h[0]; m.index=0; for(int i=0; i #include using namespace std; void beolvas(float v[], int); struct maximum { float ertek; int index; }; maximum maxker_b(float h[], int); int main() { int db, index; maximum m; const int max=30; float h[max]; //float adat[max]; //Szamitsunk 3 naponkent mozgo atlagot, adjuk meg a legmelegebb atlaghoz tartozo elso napot es a maximumot. do { cout << "Adja meg a tomb elemszamat (3<=db<= "<>h[i]; } } maximum maxker_b(float hom[], int db) { maximum m; //if(db<2) return m; float s=hom[0]+hom[1]+hom[2]; m.ertek=s/3; m.index=0; for(int i=0; i #include using namespace std; void beolvas(float v[], int); struct maximum { float ertek; int index; }; maximum maxker_b(float h[], int); int main() { int db, index; maximum m; const int max=30; float h[max]; // float adat[max]; do { cout << "Adja meg a tomb elemszamat (3<=db<= "<>v[i]; } } maximum maxker_b(float v[], int db) { maximum m; //if(db<2) return m; float s=v[0]+v[1]+v[2]; m.ertek=s/3; m.index=0; for(int i=0; i