*
* *
* * *
* * * *
* * * * *
i want code for this.pls giv me the code

Recommended Answers

All 5 Replies

Well, it's pretty freaking easy when you don't have to calculate the binomial coefficients. Just two trivial loops if you don't want leading whitespace and three if you do.

>i want code for this.
Then you'd better get started on writing it.

>pls giv me the code
No. And saying "please" isn't going to help because we don't give freebies to cheaters like you. Do it yourself and if you have a real question, we'll help answer it.

#include<iostream.h>
#include<conio.h>
void main()
{
int i,j,n;
cin>>n;
for(i=1;i<=n;i++)
{
for(j=1;j<=i;j++)
{
cout<<"*";
}
}
getch();
}
commented: Fail (on multiple levels). -4

it does rather depend what language u r using.
but it is a simple loop job where each time you go round the loop (until it exits in this case at five) you just increase the counter by +1 and then print out the '*' multiplied by the counter.

over to u
M

>it does rather depend what language u r using.
I could be wrong, but since this thread is in the C forum, it'd say C is pretty freaking likely to be the language he's using.

>over to u
Don't waste your time. By now this leech has already gotten a failing grade on the homework, and we'll never see him again.

sorry I did n't see (c!) the c forum but I agree there is only one way to program ...do it. I think this thread could be closed!
M

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.