Fan 2:
In this post of shapes in c you will be able to construct the code for a fan (Part 2) in C++ using "*".
Code:
/* Join us athttp://shapesinc.blogspot.comfor more codes of shapes*/#include<iostream>using namespace std;int main(){cout << "Join http://shapesinc.blogspot.com for more codes of shapes\n\n";int size;cout<< "Enter the size of fan" << endl;cin>>size;for(int i=0 ; i<=size ; i++){for(int j=0 ; j<i ; j++)cout<<" ";for(int spaces=i ; spaces<=size ; spaces++){if(i==0)cout<<"* ";elseif(spaces==i || spaces==size)cout<<"* ";elsecout<<" ";}for(int j=i ; j<size ; j++)cout<<" ";for(int j=0; j<=i ; j++){if(i==size)cout<<"* ";elseif(j==0 || j==i)cout<<"* ";elsecout<<" ";}cout<<endl;}for(int m=0 ; m<=size ; m++){for(int spaces1=m ; spaces1<=size ; spaces1++){if (m==0)cout<<"* ";elseif(spaces1==m || spaces1==size)cout<<"* ";elsecout<<" ";}for(int n=0; n<m ; n++)cout<<" ";for(int spaces1=0 ; spaces1<=m ; spaces1++){if(m==0 || m==size)cout<<"* ";elseif(spaces1==0 || spaces1==m)cout<<"* ";elsecout<<" ";}cout<<endl;}return 0;}