Hello :) I want to know how to make this plss

How to design a program that will compute for the value of x in the given equation below. Assume that the variables a, b, c, are to be entered by the user.

thanks :)
 
      x = (10b^2)/2    +  6 ((a-b)*c/10)
Last edited on
Please note that this is not a homework site. We won't do your homework for you. The purpose of homework is that you learn by doing. However we are always willing to help solve problems you encountered, correct mistakes you made in your code and answer your questions.

We didn't see your attempts to solve this problem yourself and so we cannot correct mistakes you didn't made and answer questions you didn't ask. To get help you should do something yourself and get real problems with something. If your problem is "I don't understand a thing", then you should go back to basics and study again.
You already have the expression, in the worst case i can assume you couldn't figure out how to do the " ^ " operation.
Since it's just " ^2" you don't even need to import fancy libraries, just multiplay the content with itself.
 
 x = ((10b)*(10b))/2    +  6 ((a-b)*c/10)

I guess you can handle the rest by yourself.


Hint: the compiler will not assume implicit multiplications, add the multiplication operator in every place you have a multiplication.
;)
@barnack, please get your maths right. There are multiple factors of b in the first section, but there aren't multiple factors of 10.

You are also ramping up an already-excessive bracket count.
Last edited on
a reason more for him to first explicitely type his operators lol
Topic archived. No new replies allowed.