You are on page 1of 1

Dietel and Dietel Exercise Solution 2.

58
============================================
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int count=4,check=0;;
for(int i=0;i<9;i++)
{
for(int y=0;y<9;y++)
{
cout<<" ";
if(count==y)
break;
}
for(int j=count;j<=4;j++)
{

if(j==4)
cout<<"*";
else
{
cout<<"*";
cout<<"*";
}
}
if(count==0||check>=1)
{
count++;
check++;
}
else
count--;

cout<<endl;
}
getch();
}

http://www.ravianeducation.blogspot.com
FARHAN: 03008855006