void f(void) { int b1 = B1(); if (b1) { int b2 = B2(); if (b2) { B3(); } else { B4(); } } B5(); while (B6()) { B12(); int b14; do { B13(); b14 = B14(); } while(b14); B15(); } int b7 = B7(); if (b7 || B8()) { B9(); } B10(); B11(); }
void graphics::NgoiNhaTiHon(QPainter& painter) { QPoint A(150,450); QPoint B(350,450); QPoint C(350,200); QPoint D(250,100); QPoint E(150,200); QPolygon poly1; poly1 << A << B << C << D << E; painter.drawPolygon(poly1); // cai cua QPoint A1(250,450); QPoint B1(250,300); QPoint C1(200,300); QPoint D1(200,450); QPolygon poly11; poly11 << A1 << B1 << C1 << D1; painter.drawPolygon(poly11); painter.drawRect(300,250,30,30); // ong khoi QPoint A12(200,150); QPoint B12(200,90); QPoint C12(175,90); QPoint D12(175,175); QPolygon poly12; poly12 << A12 << B12 << C12 << D12; painter.drawPolyline(poly12); }