Complete Code:-
void main() {
int row = 8;
int col = 3;
for (int i = 1; i <= row; i++) {
if (i <= 3) {
print(" " * (4 - i) + "* " * col);
}
if (i == 4) {
print("* * * * * * ");
}
if (i == 5) {
print(" * * * * ");
}
if (i >= 6) {
print(" " * (i - 4) + "* " * col);
}
}
}
In the first three rows of the logo, we show a rhombus pattern so we make this rhombus pattern by this code.
if (i <= 3) {
print(" " * (4 - i) + "* " * col);
}
The next two lines do not follow any pattern so we print these patterns directly.
if (i == 4) {
print("* * * * * * ");
}
if (i == 5) {
print(" * * * * ");
}
and in the last other lines, we again show a rhombus pattern so we make this rhombus pattern by this code.
if (i >= 6) {
print(" " * (i - 4) + "* " * col);
}
you can run this code here.