cout<<"O`lchami (px): "<
cout<<"Ishlab chiqargan davlat: "<
}
}
}
void search_size(string r){
string a,b,c;
ifstream input1;
input1.open("input1.txt");
while(!input1.eof()){
getline(input1,a);
getline(input1,b);
getline(input1,c);
if (b==r){
cout<<"Narxi ($): "<
cout<<"O`lchami (px): "<
cout<<"Ishlab chiqargan davlat: "<
}
}
}
void search_made(string r){
string a,b,c;
ifstream input1;
input1.open("input1.txt");
while(!input1.eof()){
getline(input1,a);
getline(input1,b);
getline(input1,c);
if (c==r){
cout<<"Narxi ($): "<
cout<<"O`lchami (px): "<
cout<<"Ishlab chiqargan davlat: "<
}
}
}
string int_to_string(int a){
ofstream str;
str.open("str.txt");
str<
string b;
ifstream ints;
ints.open("str.txt");
getline(ints,b);
return b;
}
void sort2(int n){
j[0]=0;
sort(j+0,j+n);
for(int i =1;i<=n;i++){
search_size(int_to_string(j[i]));
ab:
if(j[i]==j[i+1]){i++;goto ab;}
}
}
};
int main() {
monitor monitor;
int n,a,s;
string narxi,m,o;
cout<< "Assalomu alaykum!\nONLINE MONITOR do`koniga hush kelibsiz\n";
cout<<"Monitorlar sonini kiriting: "; cin>>n;
monitor.get_inf(n);
repeat:
cout<<"\nQididrish uchun 1 ni bosing: ";
cin>>s;
switch(s){
case 1:{
cout<<"\n\nNarx bo`yicha ma`lumot qidirish uchun 1 ni bosing.\n";
cout<<"Hotirasi bo`yicha ma`lumot qidirish uchun 2 ni bosing.\n";
cout<<"Ishlab chiqargan davlat bo`yicha ma`lumot qidirish uchun 3 ni bosing.\n";
cout<<"Barcha monitorlar bo`yicha ma`lumot olish uchun 0 ni bosing.\n\n";
cin>>a;
cout<<"\n\n";
switch(a){
case 0:{
monitor.give_inf(n);
break;
}
case 1:{
cout<<"Qaysi Narxdagi monitorlarni qidirmoqdasiz: ";
cin>>narxi;
monitor.search_color(narxi);
break;
}
case 2:{
cout<<"Qaysi razmerdagi monitorlarni qidirmoqdasiz: ";
cin>>o;
monitor.search_size(o);
break;
}
case 3:{
cout<<"Qaysi davlat ishlab chiqargan monitorlarini qidirmoqdasiz: ";
cin>>m;
monitor.search_made(m);
break;
}
}break;
}
case 2:{
monitor.sort2(n);
break;
}
}
goto repeat;
}
Natija:
Do'stlaringiz bilan baham: