#include using namespace std; class abonent{ public: string surname; string name; int phone; string adress; void print{ cout


Download 0.52 Mb.
Sana08.05.2023
Hajmi0.52 Mb.
#1447213
Bog'liq
Shavkatov Azizbek


Shavkatov Azizbek
1-misol(13-variant) Abonent familyasi,ismi,telefon nomeri,va yashash manzili haqidagi malumotlar berilgan. K nomerli telefon egasini aniqlaydigan dastur tuzing.
#include
using namespace std;
class abonent{
public:
string surname;
string name;
int phone;
string adress;
void print(){
cout< }
};
int main(){
int n,k;
cout<<"Abonentlar sonini kiriting: ";cin>>n;
abonent *client;
client=new abonent[n];
for(int i=0;i
cout<
cout<<"Familyasi: ";cin>>client[i].surname;
cout<<"Ismi: ";cin>>client[i].name;
cout<<"Telefon raqami: ";cin>>client[i].phone;
cout<<"Yashash manzili: ";cin>>client[i].adress;
}
cout<<"Izlamoqchi bo`lgan abonent telefon raqaminini kiriting: ";cin>>k;
for(int i=0;i
if(client[i].phone==k){
client[i].print();
}
}
}


2-misol(13-variant) n butun son berilgan (1
#include
using namespace std;
int main(){
int n;
cout<<"\nN=";cin>>n;
switch(n){
case 1:cout<<"A";break;
case 2:cout<<"AB";break;
case 3:cout<<"ABC";break;
case 4:cout<<"ABCD";break;
case 5:cout<<"ABCDE";break;
case 6:cout<<"ABCDEF";break;
case 7:cout<<"ABCDEFG";break;
case 8:cout<<"ABCDEFGH";break;
case 9:cout<<"ABCDEFGHI";break;
case 10:cout<<"ABCDEFGHIJ";break;
case 11:cout<<"ABCDEFGHIJK";break;
case 12:cout<<"ABCDEFGHIJKL";break;
case 13:cout<<"ABCDEFGHIJKLM";break;
case 14:cout<<"ABCDEFGHIJKLMN";break;
case 15:cout<<"ABCDEFGHIJKLMNO";break;
case 16:cout<<"ABCDEFGHIJKLMNOP";break;
case 17:cout<<"ABCDEFGHIJKLMNOPQ";break;
case 18:cout<<"ABCDEFGHIJKLMNOPQR";break;
case 19:cout<<"ABCDEFGHIJKLMNOPQRS";break;
case 20:cout<<"ABCDEFGHIJKLMNOPQRST";break;
case 21:cout<<"ABCDEFGHIJKLMNOPQRSTU";break;
case 22:cout<<"ABCDEFGHIJKLMNOPQRSTUV";break;
case 23:cout<<"ABCDEFGHIJKLMNOPQRSTUVW";break;
case 24:cout<<"ABCDEFGHIJKLMNOPQRSTUVWX";break;
case 25:cout<<"ABCDEFGHIJKLMNOPQRSTUVWXY";break;
case 26:cout<<"ABCDEFGHIJKLMNOPQRSTUVWXYZ";break;
default:cout<<"N soni 1 va 26 sonlari orasidan tanlang";
}
main();
}

Download 0.52 Mb.

Do'stlaringiz bilan baham:




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling