#include "stdafx.h"
#include "conio.h"
#include "iostream"
#include "stdio.h"
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
int a,b;
for(a=1;a<=7;a++)
{
for(b=1;b<=7;b++)
{
if(b==1 && a==4)
cout<<"*";
else
if (b==2 && (a==3||a==4||a==5))
cout<<"*";
else
if(b==3 && (a==2||a==3||a==4||a==5||a==6))
cout<<"*";
else
if(b==4 &&
(a==1||a==2||a==3||a==4||a==5||a==6||a==7))
cout<<"*";
else
if(b==5 && (a==2||a==3||a==4||a==5||a==6))
cout<<"*";
else
if (b==6 &&( a==3||a==4||a==5))
cout<<"*";
else
if(b==7 && a==4)
cout<<"*";
else
cout<<" ";
}
cout<<endl;
}
getch();
}
0 comments :
Post a Comment