Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

to compute the correct value of f Practice! In problems 1 through 3, give C++ st

ID: 669084 • Letter: T

Question

to compute the correct value of f Practice! In problems 1 through 3, give C++ statements to compute the indicated values. Assume that the identifiers in the expressions have been defined as objects of type double and have also been assigned appropriate values. Use the following constant: Acceleration of gravity: g = 9.80665 m/s? 1. Distance traveled: Distance xo + vot + a12. 2. Tension in a cord: 2m m2 mi + m2 Tension = * g 3. Fluid pressure at the end of a pipe: 2A (sin 12, the gio the 0.8 an-I Cos I cot-I

Explanation / Answer

1.

#include<iostream.h>
#include<conio.h>
#include<math.h>
int main()
{
clrscr();
int eq,find;
double float m,s,vi,ac,tm;

cout<<"Enter initial velocity";
cin>>vi;
cout<<"Enter time period";
cin>>tm;
cout<<"Enter acceleration";
cin>>ac;
s=((vi*tm)+(ac*pow(tm,2))/2);
cout<<"Distance="<<s;
getch();

return 0;
}

2.

#include<iostream.h>
#include<conio.h>
#include<math.h>

main()
{
double m1,m2,T;
double g=9.80665;

cout<<"For calculating,Tension in a cord Please Enter the following details:";
cout<<"Enter the value of m1 : ";
cin>>m1;
cout<<"Enter the value of m2 : ";
cin>>m2;
T= 2*m1*m2/(m1+m2) * g;
cout<< "Tension in a cord ,T " << T;


getch();
}