How JustAnswer Works:
  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.
Ask Scott Your Own Question
Scott
Scott, MIT Graduate
Category: Homework
Satisfied Customers: 3040
Experience:  MIT Graduate (Math, Programming, Science, and Music)
3546829
Type Your Homework Question Here...
Scott is online now
A new question is answered every 9 seconds

Write a C++ program that declares an array alpha of 50

Customer Question

Write a C++ program that declares an array alpha of 50 components of type double. Initialize the array so that the first 25 components are equal to the square of the index variable, and the last 25 components are equal to three times the index variable.
Output the array so that 10 elements per line are printed.We are needing to use 3 files (MainProgram.cpp, MyFunctions.cpp, and MyFunctions.h) I already have some done but not sure where to go from there and how to get it working. We also need to have 2 functions
Submitted: 1 year ago.
Category: Homework
Expert:  ATLProg replied 1 year ago.

Ok sounds good. Please upload file you have on wikisend.com and post file id here

Expert:  ATLProg replied 1 year ago.

By when you need this done?

Customer: replied 1 year ago.
this isn't due till Friday but I thought Id get a head start
Customer: replied 1 year ago.
My MainProgram.cpp looks like//Name: Teresa Keeler
//Date: December 8, 2015
//: Lab 8#include
#include
#include "MyFunctions.h"using namespace std;const int array_size = 50;int main(){double alpha[array_size] = { 0 };
int i = 0;setArray(alpha);// print(alpha, size)system("pause");
return 0;}
Customer: replied 1 year ago.
my MyFunctions.cpp file is:#include
#include "MyFunctions.h"using namespace std;void setArray(double alpha) {for (int i = 0; i <= 24; i++) {alpha[i] = i * i;
}
cout << alpha << endl;for (int i = 25; i <= 49; i++) {
alpha[i] = i * 3;
for ();
i % 10 == 0;
cout << alpha << endl;
}}// void print(double a)
Customer: replied 1 year ago.
the #include doesn't show up on those but is there in the program
Customer: replied 1 year ago.
MyFunctions.h is#includevoid setArray(double alpha);// void print(double a)
Expert:  ATLProg replied 1 year ago.

OK let me take a look and get back tomorow

Customer: replied 1 year ago.
okay no problem. Happy I was able to request you again.Thank you,
Teresa
Expert:  ATLProg replied 1 year ago.

Please download solution from http://wikisend.com/download/975786/MainProgramProject.zip

I hope i was able to assist you. If you are happy with my service please rate my service . If your are not 100% satisfied, please reply to me so that i can help you better.
You can ask me again using "For ATLProg only" at the start of your questions like other customers to get instant answers. It will ensure that question is for me.
Please bookmark my profile page: http://www.justanswer.com/homework/expert-atlprog/

Customer: replied 1 year ago.
I am not able to get this program to run, there are a few errors in this
Expert:  ATLProg replied 1 year ago.

It is a Visual Studio Project did you unzip it ?

Customer: replied 1 year ago.
When i input the writing that I already have , it doesnt work. I need to use the setting that I already have because its what we went over in class
Expert:  ATLProg replied 1 year ago.

You can use the project I sent itvworks with no issues

Customer: replied 1 year ago.
it is still giving me errors saying that alpha is undelcared
Customer: replied 1 year ago.
I need to use the setting that I have for main however as well because she went over that class and wants us to use that.
Customer: replied 1 year ago.
Name: Teresa Keeler
//Date: December 8, 2015
//: Lab 8#include
#include
#include "MyFunctions.h"using namespace std;const int array_size = 50;int main(){double alpha[array_size] = { 0 };
int i = 0;
Expert:  ATLProg replied 1 year ago.

Please upload your files on wikisend.com and post the file id here

Customer: replied 1 year ago.
http://wikisend.com/download/541556/Lab8.sdfi think that is it
Expert:  ATLProg replied 1 year ago.

That doesnt help you need to send the complete zipped project

Customer: replied 1 year ago.
http://wikisend.com/download/974828/Lab8.zip
Expert:  ATLProg replied 1 year ago.

that is not the complete project either

Customer: replied 1 year ago.
I know, thats what I need help with.
Customer: replied 1 year ago.
I just wanted you to see what the beginning looks like that we went over in class. I cant get it to work though when I tried to finish it and I cannot get it to print out so I need help. my professor was talking about having a for loop inside the loop but not sure what she was talking about
Expert:  ATLProg replied 1 year ago.

Have you even seen at the program i sent it has for loop

Customer: replied 1 year ago.
yea but the beginning part was different
she went over the first part in class and wanted us to use the start. We also didn't learn the func.setArray so I wouldnt know how to explain it. And for some reason I was still getting errors when I tried to input your code into my already saved project. Maybe it did not work because it was mixing?
Expert:  ATLProg replied 1 year ago.

You need to figure out a way to zip your project and send to me so I canchelp better

Customer: replied 1 year ago.
I did just zip it, didnt i?
Customer: replied 1 year ago.
http://wikisend.com/download/739426/Lab8.zip
Customer: replied 1 year ago.
when I try to run the code you provided I get the error"Severity Code Description Project File Line
Error LNK1207 incompatible PDB format in 'E:\Computer Programming\MainProgramProject\Debug\MainProgramProject.pdb'; delete and rebuild MainProgramProject E:\Computer Programming\MainProgramProject\MainProgramProject\LINK 1
"I cant get it to work either way
Customer: replied 1 year ago.
hello?
Expert:  ATLProg replied 1 year ago.

Which version of visual studiovyou have

Related Homework Questions