I really need help I'm student from college and I need to write a C program

a) declare two integer variables x and y

b) let x = 6
c) find y value use the following algebraic formula

y=2x (third power) + 5

Recommended Answers

All 4 Replies

a) declare two integer variables x and y
b) let x = 6
c) find y value use the following algebraic formula

y=2x (third power) + 5

a) int x;
int y;

b) y = 6;

c) y = 2 * (x ^3) + 5;

thank you I really apreciated your help

Alex

c) y = 2 * (x ^3) + 5;

Why do you exclusively OR x with 3? You may be interested in the pow function.

yeah, that looks like Visual Basic syntax! And, shouldn't x=6, not y=6?

So, since we've gone this far in the homework assignment (I know, we don't do homework, but since we've done it WRONG, lets at least correct it)....

x=6;
y=2*x*x*x+5;

(is it 2 times x to the third or 2x to the third?)

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.