Hey, It is not the exact logic for a given program.
Here i m giving the code with minimum number of executing steps.
also i m sure that there doesn't exist any other way to print the same Diamond such that code executing steps will be less than mine.
It is not copied from any website, book etc.
#include
void main()
{
int n,i,s,k,flagReverce=0;
printf("Enter the no. of rows\n");
scanf("%d", &n);
for (i=1; i>=1; i++)
{
for (s=n; s>i; s-)
printf(" ");
for(k=1; k<(i*2)-1; k++)
printf("*")
printf("\n")
if (i == n)
flagReverce = 1
if (flagReverce = 1)
i-=2
}
}
#include<stdio.h>
main()
{
int i,j,k,n,a,b,c,x;
printf("enter the # of rows of graphical output");
scanf("%d",&n);
/* UPPER HALF OF KITE */
for(i=1;i<=n;i++)
{
printf("\t");
for (k=1;k<=(n-i);k++)
{
printf(" ");
}
for(j=0;j<i;j++)
{
printf("*");
printf(" ");
}
for(k=1;k<=(n-i-1);k++)
{
printf(" ");
}
printf("\n");
}
/* LOWER PART OF KITE */
for(i=(n-1);i>0;i--)
{
printf("\t");
for (k=(n-i);k>0;k--)
{
printf(" ");
}
for(j=i;j>0;j--)
{
printf("*");
printf(" ");
}
for(k=(n-i-1);k>0;k--)
{
printf(" ");
}
printf("\n");
}
getch();
}
There is insufficient information in the question to answer it properly. What do you mean by "diamond". Are we talking Pascal's Triangle. Are we talking a diamond shaped field of stars? What? Please restate the question.
Logo
the strongest shaped container is a container shaped like a dick
One way is to use Thevenin's theory and methods. Léon Charles Thévenin was a French telegraph engineer who extended Ohm's Law to the analysis of complex electrical circuits.
A tear-drop shaped piece of feces which dangles from the rectum while defecating. To knock it off you must rock back and forth and from cheek to cheek to dislodge it from your sphincter.
A diamond-shaped poem is called a "diamond poem" or a "diamond shaped poem."
Bottom
There are many places where one can purchase a heart shaped diamond. A heart shaped diamond can be purchased at many popular stores such as Zales and Kay Jewelers.
Calf
a rhombus
the walnut
Plaster bagworm
A diamond-shaped knitting pattern is popular on sweaters and vests. The diamond pattern is made by knitting and purling, increasing on each row until you get to the mid-row on the diamond, then working the pattern in reverse to complete the diamond.
Kites are often shaped like diamonds, or modified diamond shapes.
Marquis is the name of a shaped cut of a gem-stone quality diamond.
Kites are often shaped like diamonds, or modified diamond shapes.
it have four