my code should expand the binomial from second to the tenth power using looping, conditional, array statements cprogram.
I must input the value of a and the value of b in the binomial: ( ax +b )
example : input: (1x+2)
output: (x^2 + 4x +4)
help me please.

The only problem I see is that you're too lazy to do your homework.
Other than that it's pretty straight forward using the binomial expansion:
(x+y)^n = nCr x^(n-r).y^r

.

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.