SYMBOL:DETAILED EXPLANATION:
-TAKE 6 ROWS AND 7 COLUMNS
-The whole symbol is divided into 3 sub problems
PART-1:
1)In zeroth row,asteriks are printed at column=1,2,4,5
for row=0 "*" at columns=1,2,4,5 i.e. where (column%3!=0)
2)In first row,asteriks are printed at column=0,3,6
for row=1 "*" at columns =0,3,6 i.e. where(column%3==0)
PART-2:

PART-3:

C++ CODE:
#include <iostream>
using namespace std;
int main()
{
int row=0,column=0;
for(row=0;row<6;row++){
for(column=0;column<7;column++){
if((row==0 && column%3!=0) ||(row==1 && column%3==0)||(row+column==8 || row-column==2) )
{
cout<<"*"<<"";
}
else cout<<" "<<"";
}
cout<<endl; // for new line
}
return 0;
}
Comments