i need a help in executing a for loop... the output should be in the form as below
*
**
***
****
how to do it..
im new to learn c language..
help me
|
Go4Expert Founder
|
![]() |
| 1May2009,13:39 | #2 |
|
You created the same thread more than once and also in the wrong forum and I have moved them into C-C++ forum for better response.
Also regarding your question I guess you need to look into using loops because this question is just a one line program using loops |
|
Mentor
|
![]() |
| 2May2009,02:57 | #3 |
|
Build it up bit by bit.
Start with a for loop that displays a number of asterisks. Make it so that you can set the number, e.g. Code:
int num=10; // this determines the number we print
for ( /* ??? but reference num */)
{
/* ??? */
}
Then enclose that lot in a loop that varies the value of num. By the looks of it each line is one asterisk longer than the previous so that should be easy. |


