Skip to main content

Pattern1 C++

 *     *

 *   * 

  * *  

   *   

  * *  

 *   * 

*     *



#include<iostream>
using namespace std;
int main()
{
  for(int i=0;i<7;i++)
  {
    for(int j=0;j<7;j++)
    {
        if(i==j || (6-i)==j)
        cout<<"*";
        else
        cout<<" ";
    }
    cout<<endl;
  }  
  return 0;
}



Comments

Popular posts from this blog

Array Data Structure

7 features of OOPs

The 7 features of OOPs are as follows: 1. Incapsulation 2. Abstraction 3. Inheritance 4. Polymorphism 5. Object must be used 6. Massage passing : One object can interect with another object 7. Dynamic binding The most initial 4 are the basic OOPs features that is required.