Could someone please explain to me how to produce the following using appropiate flow control statements e.g if statement
* * * * * *
* * * * *
* * * *
* * *
* *
*
Could someone please explain to me how to produce the following using appropiate flow control statements e.g if statement
* * * * * *
* * * * *
* * * *
* * *
* *
*
By using for loop.
but you can use while or do...while loop if you wish to.
HINT: use nested for loops!
PS:
why not surprise your teacher and print something like:
Code:* ** *** *************** **************** *************** *** ** *
Last edited by manav; 02-06-2008 at 06:03 AM.
All problems in computer science can be solved by another level of indirection,
except for the problem of too many layers of indirection.
– David J. Wheeler
Elysia!!!
Are you listening!
vart forgot to put a return 0; here!
rory-uk :
Just forget the loops and use printf. Using your mind to make loops is just a waste of time.
I understand that this can be produced by using printf statements, however I have a task which involves producing this code with a flow statement. Could somebody please show me how to write the code using a while loop or whichever loop that you can use to produce this?
What have you tried?
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)