Displaying Source Code(s)
|
|
Do you want a diomond?
--------------------------------------------------------------------------------
Description : This is not a prog. to time pass,because it is a
way to finding me as a idal friend,if you want to me mail me,
but it should be touch my heart...
// DIOMOND
#include<iostream.h>
#include<conio.h>
void main()
{
int i,j,k;
clrscr();
for(i=1;i<=15;i++){
for(j=i;j<15;j++)
cout<<" ";
k=2*i-1;
while(k>=1){
cout<<"*";
k--;
}
cout<<"<BR>;
}
for(i=14;i>=1;i--){
for(j=i;j<15;j++)
cout<<" ";
k=2*i-1;
while(k>=1)
{
cout<<"*";
k--;
}
cout<<"<BR>;
}
getch();
}
|
|
|