Muhammad al Xorazmiy nomidagi Toshkent Axborot Texnologiyalari Universiteti Patok
Download 0.66 Mb.
|
Makumotlar tuzilmasi labaratoriya
- Bu sahifa navigatsiya:
- 3-tajriba ishi. MA’LUMOTLARNI SARALASH USULLARINI TADQIQ QILISH
Muhammad al_Xorazmiy nomidagi Toshkent Axborot Texnologiyalari Universiteti Patok: SWD001-2 Topshirdi: Shirinov Shohrux Qabul qildi: Abduvaliyeva Zebiniso Labaratoriya ishi 2-tajriba ishi. QIDIRUV USULLARINI TADQIQ QILISH Dastur kodi: #include using namespace std; int main(){ int n;cout<<"n=";cin>>n; struct Guruh{ string fio,adres; }talaba[n]; for(int i=0;i string key="TTJ"; while(low<=hi){ int mid = (low + hi) / 2; q++; if (key == talaba[mid].adres){ search = mid; break; } if (key < talaba[mid].adres) hi = mid - 1; else low = mid + 1; } if(search!=-1) cout<<"qidirilayotgan talaba "< return EXIT_SUCCESS; } while(talaba[search-1].adres==key) search--; while(talaba[search].adres==key) { cout< system("pause"); } 3-tajriba ishi. MA’LUMOTLARNI SARALASH USULLARINI TADQIQ QILISH 19. Talabalarni birinchi va ikkinchi imtihoni natijalari bo‘yicha kamayish tartibida. import java.util.ArrayList; import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner=new Scanner(System.in); Talaba talaba1=new Talaba("Adashaliyev Asadbek",2001,5,5,4,5,94); Talaba talaba2=new Talaba("Bozorboyev Nurbek",2002,5,5,4,4,87); Talaba talaba3=new Talaba("To'rayev Maqsud",2003,3,4,3,5,68); Talaba talaba4=new Talaba("Bozorov Javohir",2002,4,4,4,4,85); Talaba talaba5=new Talaba("Burhonov Karomatullo",2002,4,5,4,4,80); Talaba talaba6=new Talaba("Baxtiyorov Humoyun",2000,3,4,4,3,64); Talaba[] talabalar={talaba1,talaba2,talaba3,talaba4,talaba5,talaba6}; for (int i = 0; i < 5; i++) { for (int j = i+1; j <=5 ; j++) { if (talabalar[i].sesiya } } System.out.println(talabalar[i]); } }
public class Talaba {
public Talaba(String fio, int burthday, int MTA, int matematika, int fizika, int dasturlash, int sesiya) { this.fio = fio; this.burthday = burthday; this.MTA = MTA; Matematika = matematika; Fizika = fizika; Dasturlash = dasturlash; this.sesiya = sesiya; } public String getFio() { return fio; } public void setFio(String fio) { this.fio = fio; } public int getBurthday() { return burthday; } public void setBurthday(int burthday) { this.burthday = burthday; } public int getMTA() { return MTA; } public void setMTA(int MTA) { this.MTA = MTA; } public int getMatematika() { return Matematika; } public void setMatematika(int matematika) { Matematika = matematika; } public int getFizika() { return Fizika; } public void setFizika(int fizika) { Fizika = fizika; } public int getDasturlash() { return Dasturlash; } public void setDasturlash(int dasturlash) { Dasturlash = dasturlash; } public int getSesiya() { return sesiya; } public void setSesiya(int sesiya) { this.sesiya = sesiya; } @Override public String toString() { return "Talaba{" + "fio='" + fio + '\'' + ", burthday=" + burthday + ", MTA='" + MTA + '\'' + ", Matematika=" + Matematika + ", Fizika=" + Fizika + ", Dasturlash=" + Dasturlash + ", sesiya=" + sesiya + '}'; } } Dastur natijasi: Download 0.66 Mb. Do'stlaringiz bilan baham: |
ma'muriyatiga murojaat qiling