/*
auto --> markanev,model
tipus --> model neve,kiadas eve,motor tipusa
motor --> motor tipusa[benzin/diesel/gaz],kobcenti,loero
3auto --> 100loero feletti es legidosebb
*/
#include <cstdlib>
#include <iostream>
#include <string>
using namespace std;
struct motor {
string motor;
int kob;
int loero;
};
struct tipus {
string mnev;
int kiadas;
motor mtipus;
};
struct autoo{
string marka;
tipus model;
};
using namespace std;
int main(int argc, char *argv[])
{
int feletti[3];
int alatti[3];
int oreg[3];
int fiatal[3];
int min = 500;
int max;
autoo a[3];
for(int i = 0; i < 3; i++ ){
cout << "[" << i + 1 << "]Auto -> markaja[s]: ";
cin >> a[i].marka;
cout << "[" << i + 1 << "]Auto -> model -> neve[s]: ";
cin >> a[i].model.mnev;
cout << "[" << i + 1 << "]Auto -> model -> kiadas[i]: ";
cin >> a[i].model.kiadas;
cout << "[" << i + 1 << "]Auto -> model -> motor -> mtipus[s]: ";
cin >> a[i].model.mtipus.motor;
cout << "[" << i + 1 << "]Auto -> model -> motor -> kob[i]: ";
cin >> a[i].model.mtipus.kob;
cout << "[" << i + 1 << "]Auto -> model -> motor -> loero[i]: ";
cin >> a[i].model.mtipus.loero;
}
system("cls");
cout << "adatok" << endl;
for ( int i = 0; i < 3; i++ ) {
cout << "Auto -> marka: ";
cout << a[i].marka;
cout<<endl;
cout << "Auto -> model -> neve[s]: ";
cout << a[i].model.mnev;
cout<<endl;
cout << "Auto -> model -> kiadas[i]: ";
cout << a[i].model.kiadas;
cout<<endl;
cout << "Auto -> model -> motor -> mtipus[s]: ";
cout << a[i].model.mtipus.motor;
cout<<endl;
cout << "Auto -> model -> motor -> kob[i]: ";
cout << a[i].model.mtipus.kob;
cout<<endl;
cout << "Auto -> model -> motor -> loero[i]: ";
cout << a[i].model.mtipus.loero;
cout<<endl;
}
for ( int i = 0; i < 3; i++ ) {
if ( a[i].model.mtipus.loero > 100 ) {
feletti[i] = i;
}
else {
alatti[i] = i;
}
if ( a[i].model.kiadas > min ) {
min = i;
}
}
cout << endl << endl;;
for ( int i = 0; i < 3; i++ ) {
cout << "100loerotol nagyobbak: " << endl;
cout << "Marka: " << a[feletti].marka << " Modell: " << a[feletti].model.mnev;
cout << endl << endl;
}
cout << "Legidosebb: " << endl;
cout << "Marka: " << a[min].marka << " Modell: " << a[min].modell.mnev;
system("PAUSE");
return EXIT_SUCCESS;
}
{"text":"text","html5":"html","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"lua","bash":"sh","erlang":"erlang","go":"golang","c":"c_cpp","cpp":"c_cpp","diff":"diff","latex":"latex","sql":"sql","xml":"xml","0":"text","abap":"abap","actionscript":"actionscript","actionscript3":"actionscript","ada":"ada","apache":"apache_conf","applescript":"applescript","asm":"assembly_x86","autohotkey":"autohotkey","closure":"closure","cobol":"cobol","coffeescript":"coffee","cpp-winapi":"c_cpp","c_loadrunner":"c_cpp","c_mac":"c_cpp","c_winapi":"c_cpp","csharp":"csharp","d":"d","dart":"dart","dot":"dot","eiffel":"eiffel","fortran":"fortran","groovy":"groovy","haskell":"haskell","haxe":"haxe","ini":"ini","io":"io","java":"java","java5":"java","make":"makefile","matlab":"matlab","mysql":"mysql","objc":"objectivec","ocaml":"ocaml","pascal":"pascal","perl":"perl","perl6":"perl","postgresql":"pgsql","powershell":"powershell","prolog":"prolog","properties":"properties","rails":"ruby","rust":"rust","scala":"scala","scheme":"scheme","smarty":"smarty","tcl":"tcl","vala":"vala","vb":"vbscript","verilog":"verilog","vhdl":"vhdl","yaml":"yaml"}