• 5 std::cout Mana bu dasturni ham amalga oshiring: int* createPtr(int value)
  • Mana shu ssilkadan kirib o’rganing
  • Fizik jarayonlarni kompyuterda modellashtirish




    Download 15,08 Mb.
    bet79/135
    Sana22.05.2024
    Hajmi15,08 Mb.
    #250347
    1   ...   75   76   77   78   79   80   81   82   ...   135
    Bog'liq
    Fizik jarayonlarni kompyuterda modellashtirish

    Amaliy topshiriqlar:

    1. Quyidagi dasturni amalga oshiring:

    1. 1 int *p1 = new int(); // avtomatik holatda qitmati- 0

    2. 2std::cout << "p1: " << *p1 << std::endl; // 0

    3. 3

    4. 4 int *p2 = new int(12);

    5. 5 std::cout << "p2: " << *p2 << std::endl; // 12

    1. Mana bu dasturni ham amalga oshiring:

    1. int* createPtr(int value)

    2. {

    3. int *ptr = new int(value);

    4. return ptr;

    5. }

    6. void usePtr()

    7. {

    8. int *p1 = createPtr(10);

    9. std::cout << *p1 << std::endl; // 10

    10. delete p1; // объект надо освободить

    11. }

    12. int main()

    13. {

    14. usePtr();


    15. return 0;

    16. }

    1. Mana shu ssilkadan kirib o’rganing: https://www.youtube.com/watch?v=H3t8C8WD4K8.

    2. Quyidagi ssilkadan kirib min va maz funktsiyalarni yaratishni o’rganing: https://www.youtube.com/watch?v=0vN7tidBGVY.

    Pedagogik texnologiya: Nilufar Gullarining Klasteri. Sxema 22:

    Rasm 39. Nilufar gulining nilufar gullari texnologiyasi.
    Foydalanilgan adabiyotlar:
    1. T.X.Xolmatov va boshqalar. “Informatika”, Toshkent, 2003
    2. R.Karimov va boshqalar. “Dasturlash”, Toshkent, 2003
    3. SH.SH.SHoxamidov. “Amaliy matematika elementlari”, Toshkent, 1997
    4. AsharinaI.V. “Osnovo‘ programmirovaniya na yazi‘kaxC/C++,
    Moskva, 2002.
    5. PavlovskayaT.A. «С/С++ programmirovanie na yazi‘ke vi‘sokogo
    urovnya», S.Peterburg, 2001


    Download 15,08 Mb.
    1   ...   75   76   77   78   79   80   81   82   ...   135




    Download 15,08 Mb.

    Bosh sahifa
    Aloqalar

        Bosh sahifa



    Fizik jarayonlarni kompyuterda modellashtirish

    Download 15,08 Mb.