DEV Community

thequvonc
thequvonc

Posted on

2 sonidan iborat tortburchak yaratish!


#include <iostream>
using namespace std;
int main() {
 int a;
cin >> a;

  cout << a << a << a << a << a << a << endl;
  cout << a << "    " << a << endl;
  cout << a << "    " << a << endl;
cout << a << a << a << a << a << a << endl;



return 0;
  }   

Enter fullscreen mode Exit fullscreen mode

bu cod imizda sa sal boshqacharoq yol tutamiz

*birinchidan int son oqib olamiz keyin esa bizga cout << buyrugi kerak boladi
*6 qatordan a xarifini bolib, yozib olamiz.
*consoledagi javobimizda pastki qatorga alohida chiqarilishi uchun bizga << endl buyrugi kerak boladi!
*va tortburchagimiz hosil bolganidan keyin biz return 0; belgisini yozib olamiz!

doimgiday ooooooxiriga } funksiyasini joylaymiz!
va nixoyat biz qanday qilib tortburchakni hosil qilishni organib oldik!

@dawroun

Top comments (0)