pattern printing in c/c++- ganesha pattern printing- Given the number of rows and columns, print the corresponding swastika pattern using loops. Note : The number of rows and columns should be same and an odd number. This will generate a perfect swastika pattern. Input : row = 7, column = 7 Output: * * * * * * * * * * * * * * * * * * * * * * * * * #include<iostream> using namespace std; int main() { int n,star,space,i=0,row=1; cin>>n; star=(n/2)+1; space=(n/2)-1; for(row=1;row<=1;row++) { cout<<"*"; for(i=1;i<=space;i++) { cout<<" "; } for(i=1;i<=star;i++) { cout<<"*"; } cout<<endl; } while(row<=(n/2)) { cout<<"*"; for(i=1;i<=space;i++) { cout<<" ";
Technical Keeda is best plateform for learning coding, Programming,competitive programming ,c++ language. Here we Provide best explaination of Programming question also Here You can boost your technical knowledge.You Will get aware of latest technology available in market.