write this code in turbo c++
#include <iostream.h>
#include<conio.h>
void main ();
{
int i,j,k,l,m,n,o;
for(i=1;i<=8;i++)
{
for(j=8;j>i;j--) cout<<" ";
cout<<"*";
for(k=1;k<i;k++)cout<<" ";
cout<<"*";
for(m=1;m<=8;m++)cout<<" ";
cout<<"*";
for(n=1;n<=8;n++)cout<<" ";
cout<<"*";
for(o=1;o<=2;o++)cout<<" ";
cout<<"*";
cout<<endl;
if(i==8)
{cout<<"***************************"<<" "<<"*"<<endl;
cout<<endl;
cout<<"written by Rizwan Akhtar"<<endl<<endl<<"\n\n\n";
}
}
getch();
}
![]()
Bookmarks