1. Engineering
  2. Computer Science
  3. please help i basically need to merge the two files...

Question: please help i basically need to merge the two files...

Question details
Please help. I basically need to merge the two files together and do a little editing to meet the requirements in the assignment below thanks!

3.3.1. Using your favorite editor, code a program (simple.cpp) that processes an array of dynamic numbes(less than 10), calculates: (1) a factorial value based on how many positive numbers users want to input, (2) the value of standard deviation, and prints it out. I recommend either vi/vim as an editor for our course. Both factorial.cpp and standard deviation.cpp are uploaded on Canvas 3.3.2. The GNU compile is the default open source compiler on Linux. You should check a little on what gcc you have, and then compile your program as follows
Back factorial.cpp // C++ Program to find factorial of a number // Factorial on n12*3*. . . *n #include <iostream> using namespace std; int main() int i, n, factorial1; cout << Enter a positive integer:; cin >> n; factorial *-i; // factorial factorial * i; cout<< Factorial of <<n< < - <<factorial; coutくくendl ; return 0;
Back standard.cpp #include <iostream> #include <cmath> using namespace std; float calculateSD (float data int main() int i; float data[ 10] cout <<Enter 10 elements: for(i - 0 i< 10 ++i) cin >> data[i; cout << end! << Standard Deviation = << calculateSD (data); return 0; float calculateSD (float data]) float sum0.0, mean, standardDeviation- 0.0; int i; for(i 0; i< 10; ++i) sum += data [i]; mean- sum/10; for(i - 0; i< 10; +i) standardDeviation + pow (data[i] - mean, 2); return sqrt (standardDeviation 10)
Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution