I\'m using Dec-C++ program I inserted this #include <iostream> #include <cstdlib
ID: 2247309 • Letter: I
Question
I'm using Dec-C++ program
I inserted this
#include <iostream>
#include <cstdlib>
#include <cmath>
using namespace std;
int main()
{
Distance = x0 + v0*t + 0.5*a*t*t;
Tension = (2*m1*m2)/(m1+m2)*g;
P2 = P1+(p*v*(A2*A2-A1*A1))/(2*A1*A1)
return EXIT_SUCCESS;
but I've got these errors
[Error] 'P2' was not declared in this scope
same errors but for different letters
f , and must be floatingpoint variabi SIMPLE CRUl , numerator, CHAP2 The variables , denom. to compute the correct value of e. order 3 ,ctice! h 3, give C statements to compute the indicated values (. problems he identifiers in the expressions have been defined as double va In Ales been assigned appropriate following const and have also values. Use the 9.80665 m/s? 1 through that t Overflow Acceleration of gravity: 8 - 1. Distance traveled: Underlow Distance = to + Vot . + a2. 2. Tension in a cord: 2m,2 E. Tension = m, + my 3. Fluid pressure at the end of a pipe: pu(A - AB) P = P, + In problems 4 through 6, give the mathematical equations computed by the C mo that the following symbolic constants have been defined,Explanation / Answer
//Please see the C statement to calculate Distance, Tension and P2 below:
#include <iostream>
#include <cstdlib>
#include <cmath>
using namespace std;
int main()
{
//acceleration of gravity
double g=9.80665;
double x0,v0,t,a,m1,m2,P1,p,v,A1,A2;
double Distance = x0 + v0*t + 0.5*a*t*t;
double Tension = (2*m1*m2)/(m1+m2)*g;
double P2 = P1+(p*v*(A2*A2-A1*A1))/(2*A1*A1);
return EXIT_SUCCESS;
}