#### Category : equation

I have the answer to this equation in Pascal. Can anyone help me convert this to c or c ++? Source: Windows Que..

I have a C++ lab and the problem is this: The user should enter a value for X(X is the number of tests held). If x<15, the program does not calculate anything. If X is between 16 and 30, the program should calculate C=1.0/10.0*(24A) and if X>30 the program should calculate C=0.15(24*A). My multiple if ..

Y=-4bb+5.0/9.0*(a/b)+10 Hello guys, this is an equation that I should program in C++. This is the form that I have entered: Y=-4*(b^2)+5.0/9.0*(a/b)+10; and for a=2 and b=3.4 I get the result -35.9132 while in my calculator the result is −35.259608. Can someone help me with finding the error cuz I am not sure what it ..

I need to evaluate the expression cbrt(b) / ((b)^2 + 1). If b less than zero, the log is not correct and outputs an incorrect answer. For example, if the input is -3 the answer is y = -1IND. #include <iostream> #include <cmath> int main() { float b, y, y1, y2; std::cout << "The equation: ..

C++ I need to evaluate the expression cbrt(b) / ((b)^2 + 1) if ‘b’ is only negative number log is not competent { y1 = cbrt(b); y2 = pow(b,2) + 1; y2 = 1 / y2; y = y1 * y2; cout << "y = "<< y << endl; } Source: Windows Que..

I am trying to write a piece of code for my old Highschool teacher for a game he had us play literally called the "Dice Game." Let’s just say that the game takes two d12’s and multiplies them together to get a number (D) in this instance. Then you take 3 d6’s and roll them ..

int Electra2D::Collision() { for (std::list<Entity>::iterator affecting = entities.begin(); affecting != entities.end(); ++affecting) { for (std::list<Entity>::iterator affected = entities.begin(); affected != entities.end(); ++affected) { if (affecting->type == DrawTypes::Circle && affected->type == DrawTypes::Circle && affecting->object->id != affected->object->id) { float distance = affected->pos.getDistance(affecting->pos); float limit = ((ObjectCircle*)affected->object)->radius + ((ObjectCircle*)affecting->object)->radius; if (distance <= limit) { Vector2 SP = affected->velocity ..