Please i need someone to help me with the assignement below, thank you

Directions: Perform a detailed analysis of the differences and similarities between M1 and M2 below

M1

#include

#include

#include

#include “M7.h”

using namespace std;

void main()

{

       string sName;

       const int iArraySize = 5;

       int iArray [iArraySize] = {0};

       float fArray[iArraySize] = {0.0};

       ProgramHeader();//function call for the program header

      

       menu(sName, iArray, fArray, iArraySize);// the menu

       system(“cls”);//clearing the DOS window

       Output(sName);//outputing the char array

       Output(iArray, iArraySize);//outputing the int array while calling the sort and finding the median

       Output(fArray, iArraySize);//outputing the float array while calling the sort and finding the median

       cout

       _getch();

}//end main

M2

#include “stdafx.h”

#include

#include

using namespace std;

inline void nameInputFunction(string name)

{

getline(cin, name);

}

//below is a template function to take user input for an array

//and array is passed here as a pointer

template

void functionForArrayInput(T *array)

{

for (int i = 0; i

cin >> array[i];

}

template

void sortArray(T *arr) {

int i, j;

T key;

for (i = 1; i

{

key = arr[i];

j = i – 1;

while (j >= 0 && arr[j] > key)

{

arr[j + 1] = arr[j];

j = j – 1;

}

arr[j + 1] = key;

}

}

void display(char name[]) {

cout

int i = 0;

while (name[1] != '0') {

cout

++i;

}

cout

}

void display(int array[]) {

cout

int i = 0;

while (i

cout

++i;

}

cout

}

void display(float array[]) {

cout

int i = 0;

while (i

cout

++i;

}

cout

}

int main()

{

string name;

int int_array[5];

float float_array[5];

cout

nameInputFunction(name);

cout

functionForArrayInput(int_array);

cout

functionForArrayInput(float_array);

sortArray(int_array);

sortArray(float_array);

cout

display(int_array);

cout

display(float_array);

cout

cout

cout

return 0;

}

"Get 15% discount on your first 3 orders with us"
Use the following coupon
"FIRST15"

Order Now