{"id":169,"date":"2012-03-16T19:43:07","date_gmt":"2012-03-16T18:43:07","guid":{"rendered":"http:\/\/csipet.web.elte.hu\/?p=169"},"modified":"2012-03-16T19:43:07","modified_gmt":"2012-03-16T18:43:07","slug":"5-het","status":"publish","type":"post","link":"https:\/\/peter.csonka.hu\/hu\/blog\/2012\/03\/5-het\/","title":{"rendered":"5. h\u00e9t"},"content":{"rendered":"<p><a href=\"https:\/\/docs.google.com\/document\/d\/1uaCgD9nvjyhpG8gDEYpZYvFmetwnx6RACpfDHrTRVyg\/edit\">https:\/\/docs.google.com\/document\/d\/1uaCgD9nvjyhpG8gDEYpZYvFmetwnx6RACpfDHrTRVyg\/edit<\/a><\/p>\n<pre lang=\"c\">#include\n#include\n\nusing namespace std;\n\nvoid beolvasas(vector &amp;t);\nvoid feladat8(const vector t, int &amp;db);\nbool volt(const int i, const vector t);\n\nint main(){\n    vector t;\n    int db;\n\n    beolvasas(t);\n    feladat8(t, db);\n\n    cout &lt;&lt; db &lt;&lt; \" db kulonbozo tipus van!\" &lt;&lt; endl;\n\n    return 0;\n}\n\nvoid beolvasas(vector &amp;t){\n    int n;\n    cout &lt;&lt; \"N=\";\n    cin &gt;&gt; n;\n    t.resize(n);\n    for(int i=0; i&gt; t[i];\n    }\n}\nvoid feladat8(const vector t, int &amp;db){\n    db=0;\n    int n = t.size();\n    for(int i=0; it){\n    int j=0;\n    while(j<\/pre>\n<pre lang=\"c\">#include \n#include \n#include \n\nusing namespace std;\n\nvoid beolvasas(vector &gt; &amp;t);\nvoid fel5(const vector &gt; t, int &amp;hol);\ndouble osszeg(const int i, const vector &gt; t);\n\nint main(){\n    vector &gt; t;\n    int hol;\n\n    beolvasas(t);\n    fel5(t, hol);\n\n    cout &lt;&lt; hol &lt;&lt; \". a legnagyobb!\" &lt;&lt; endl;\n\n    return 0;\n}\n\nvoid beolvasas(vector &gt; &amp;t){\n    int n;\n    ifstream ifs(\"be.txt\");\n    ifs &gt;&gt; n;\n    t.resize(n);\n    for(int i=0; i&gt; t[i][j];\n        }\n    }\n}\nvoid fel5(const vector &gt; t, int &amp;hol){\n    double max;\n    int n = t.size();\n    hol = 0;\n    max = osszeg(0, t);;\n    for(int i=0; imax){\n            hol=i;\n            max=osszeg(i, t);\n        }\n    }\n}\ndouble osszeg(const int i, const vector &gt; t){\n    double s=0;\n    for(int j=0;j<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>https:\/\/docs.google.com\/document\/d\/1uaCgD9nvjyhpG8gDEYpZYvFmetwnx6RACpfDHrTRVyg\/edit #include #include using namespace std; void beolvasas(vector &amp;t); void feladat8(const vector t, int &amp;db); bool volt(const int i, const vector t); int main(){ vector t; int db; beolvasas(t); feladat8(t, db); cout &lt;&lt; db &lt;&lt; &#8221; db kulonbozo tipus van!&#8221; &lt;&lt; endl; return 0; } void beolvasas(vector &amp;t){ int n; cout &lt;&lt; &#8222;N=&#8221;; cin &gt;&gt; n; t.resize(n); for(int i=0; i&gt; t[i]; } } void feladat8(const vector t, int &amp;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 &gt; &amp;t); void fel5(const vector &gt; t, int &amp;hol); double osszeg(const int&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[63],"tags":[],"class_list":["post-169","post","type-post","status-publish","format-standard","hentry","category-programozasi-alapismeretek-2"],"_links":{"self":[{"href":"https:\/\/peter.csonka.hu\/hu\/wp-json\/wp\/v2\/posts\/169","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/peter.csonka.hu\/hu\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/peter.csonka.hu\/hu\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/peter.csonka.hu\/hu\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/peter.csonka.hu\/hu\/wp-json\/wp\/v2\/comments?post=169"}],"version-history":[{"count":0,"href":"https:\/\/peter.csonka.hu\/hu\/wp-json\/wp\/v2\/posts\/169\/revisions"}],"wp:attachment":[{"href":"https:\/\/peter.csonka.hu\/hu\/wp-json\/wp\/v2\/media?parent=169"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/peter.csonka.hu\/hu\/wp-json\/wp\/v2\/categories?post=169"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/peter.csonka.hu\/hu\/wp-json\/wp\/v2\/tags?post=169"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}