i would like to print this
*******
*** ***
** **
* *
*
i am only asking for logic...
i would like to print this
*******
*** ***
** **
* *
*
i am only asking for logic...
"Service of the poor and destitutes is the service of the God"
Normative Changes to ISO/IEC 9899:1990 in Technical Corrigendum 1
Incompatibilities Between ISO C and ISO C++
Ask a silly question...Code:printf("*******\n*** ***\n** **\n* *\n*\n");
Quzah.
Hope is the first step on the road to disappointment.
My problem was not properly indented....was not able to do it....i wanted to print diamond shape....but the type of reply wasn't expecting from u.....i wanted to code it.....anyways thanx..problem was solved....Originally Posted by quzah
"Service of the poor and destitutes is the service of the God"
Normative Changes to ISO/IEC 9899:1990 in Technical Corrigendum 1
Incompatibilities Between ISO C and ISO C++
look up loops like for or while...
print required number of *s in every iteration.
Code:>+++++++++[<++++++++>-]<.>+++++++[<++++>-]<+.+++++++..+++.[-]>++++++++[<++++>-] <.>+++++++++++[<++++++++>-]<-.--------.+++.------.--------.[-]>++++++++[<++++>- ]<+.[-]++++++++++.
Right, so where exactly in your post do you say anything about printing a diamond? Oh, that's right! You didn't say anything anywhere about it. See how silly it was for you to post what you did, considering there's a PREVIEW button and an EDIT button?Originally Posted by sunnypalsingh
Quzah.
Hope is the first step on the road to disappointment.
With the number of *'s printed per line in the original post, I don't see how it's possible to get a diamond shape even if the indentation is wrong. One would imagine that the top and bottom line of *'s would have the same number of *'s in it for it to print a diamond shape.
If you understand what you're doing, you're not learning anything.