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

C++ *please do not handwrite* The variation of a mass of a particle, according t

ID: 3596793 • Letter: C

Question

C++ *please do not handwrite*

The variation of a mass of a particle, according to Einstein's theory of relativity, is given by: m/m0=1/(sqrt(1-(v/c)^2) where m0 is the mass of the particle at velocity v=0 and c is the speed of light. Output a table of values for m/m0 for values of v/c ranging from 0.2 to 0.9, in increments of 0.1. Note that there is no user input for this program and that m/m0 is the quantity you are solving for (you can just call it M if you want. Also, just plug in the range of values (0.2 to 0.9) for the quantity v/c ( you can just call this VC if you want). Use a while loop to complete this problem.
3. The variation of a mass of a particle, according to Einstein's theory of relativity, is given by: m/mo/(sqrt(1 - (v/c)) where mo is the mass of the particle at velocity v-0 and c is the speed of light. Output a table of values for m/mo for values of v/c ranging from 0.2 to 0.9, in increments of.1. Note that there is no user input for this program and that m/mo is the quantity you are solving for (you can just call it M if you want. Also, just plug in the range of values (.2 to .9) for the quantity v/e (you can just call this VC if you want). Use a while loop to complete this problem.

Explanation / Answer

#include <iostream>
#include <cmath>
using namespace std;

int main() {
  
   float M;                         // M = m/m0
   float VC = 0.9;              // VC = v/c
  
   while(VC > 0.1)
   {
        M = 1/sqrt(1-pow(VC,2));
        cout << "For VC:" << VC << "   M=" << M << endl;
        VC = VC - 0.1;
   }
  
}

output

-------------------------------------------

For VC:0.9   M=2.29416
For VC:0.8   M=1.66667
For VC:0.7   M=1.40028
For VC:0.6   M=1.25
For VC:0.5   M=1.1547
For VC:0.4   M=1.09109
For VC:0.3   M=1.04828
For VC:0.2   M=1.02062