Write a C++ program that declares an array alpha that has 50 double components. Write a function that stores the square of the index for the first 25 components and half of the index for the last 25 components. Write a function that prints the contents of the array with 10 elements per line.
As it is, I suspect the instructions intended you to write two separate functions as well as main; you've written one function, main, that does everything.
Why do you have conio.h, fstream and string in there?