A ball of mass (75 plusminus 1) g is fired into a bob of mass (480 plusminus 3)
ID: 674158 • Letter: A
Question
A ball of mass (75 plusminus 1) g is fired into a bob of mass (480 plusminus 3) g. The dot on the bob rises (4. 1 plusminus 0. 2) cm vertically. The ball is then fired horizontally from a table top so that the bottom of the ball starts out (147 plusminus 2) cm above the level floor. It hits the floor (345 plusminus 3) cm from the starting point. Has momentum been conserved? WHY/WHY NOT? SHOW ALL WORK![YES: momentum before = (4. 72 plusminus 0. 18)xl04 g-cm/s; momentum after = (4. 98 plusminus 0. 14)xio4 g-cm/s]Explanation / Answer
#include <iostream>
#include <math.h>
using namespace std;
float calcMean(float x1, float x2, float x3, float x4, float x5) {
return (x1+x2+x3+x4+x5)/5.0;
}
float calcSD(float x1, float x2, float x3, float x4, float x5, float x) {
return sqrt((((x1-x)*(x1-x)) + ((x2-x)*(x2-x)) + ((x3-x)*(x3-x)) + ((x4-x)*(x4-x)) + ((x5-x)*(x5-x)))/5.0);
}
int main() {
float x1,x2,x3,x4,x5;
cout<<"Enter 5 numbers seperated by space: ";
cin>>x1>>x2>>x3>>x4>>x5;
cout<<" ";
float mean = calcMean(x1, x2, x3, x4, x5);
cout<<"Mean is: "<<mean<<" ";
cout<<"Standard Deviation is: "<<calcSD(x1, x2, x3, x4, x5, mean);
cout<<" ";
return 0;
}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.