Untitled

 avatar
unknown
plain_text
3 years ago
829 B
6
Indexable
#include <iostream>
using namespace std;
#define SIZE 5

int main()
{
    int rows;
cout<<"Enter number between 3-9"<<endl;
cin >>rows;
for(int i=0;i<SIZE;++i)
{
    for(int j=0;j<SIZE;++j)
    {
        if(SIZE<3 && SIZE>9)
        {
            cout<<"Error ,You entered an incorrect value: Try again."<<endl;
            cin>>rows;
        }
        
        if(i==0 && SIZE+1)
        {
            cout<<"*";
        }
        
        if(i==2 && SIZE+1)
        {
            cout<<"*";
        }
        
        if(i==4 && SIZE+1)
        {
            cout<<"*";
        }
        
        if(i==3 && SIZE-1)
        {
            cout<<"*";
        }
        else
        cout<<"' '";
        
        if(i==1 && j==0)
        {
            cout<<"*";
        }
        
    }
     cout<<"' '"<<endl;
}

    return 0;
}
Editor is loading...