DEV Community

thequvonc
thequvonc

Posted on

Harfli uchburchak yaratish!


#include <iostream>
using namespace std;
int main() {
cout << "  A\n";
cout << " A A\n";  
cout << "AAAAA";
return 0;
}


Enter fullscreen mode Exit fullscreen mode

bunda birinchi navbatta <iostream> kutubxonasini chaqirib olamiz va keyin using namespace std; ni xam yozamiz . albatta int main (){ ni kiritib keyin
cout << " A ( etibor qaratamizz bu yerda A dan oldin joy tashladm chunki consoledagi javobda A lar uchburchakni xosil qilish kerak!)
va uninhg oldiuga albatta \n ni joylaymiz chunki bular qatori alohida bolishi kerak!

qatorimiz tugaganida oxiriga ; belgisini qoyamiz!

oxirida albatta return 0; va eng oxirida } belgisini qoyishimiz zarur!

@dawroun

Top comments (1)

Collapse
 
dawroun profile image
Davron

qoyil