Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Homework Help/Study Tips Expert

Create two single dimension arrays that contain 10 floating-point numbers in each array. Create a third single dimension array to hold a sum. Your main program will take the two arrays of float and pass them to the function addfloat() Inside the function, add the first array to the second array and put the total into the third array. Print the values of all three arrays back in the main program. Here is what I have so far. I am baffled.

include

void addfloat(float a[], float b[], float c[]);

    int d = 0;

    for (d = 0; d < 10; d++)

    {

        c[d]=a[d]+b[d]

    }

 

int main()

{

 

    float RCT1[10] = {3.22, 9.99, 23.45, 1.50, 2.63, 11.50, 13.49, 100.88, 8.00, 33.19};

    float RCT2[10] = {9.99, 8.33, 29.99, 14.07, 27.39, 12.28, 1.79, 47.99, 10.00, 13.99};

    float TOT[10];

    int a;

    addfloat(RCT1, RCT2, TOT);

    printf("\nReceipt 1 total: \n");

    for (a = 0; a < 10; a++)

    {

        printf("%2.2f", RCT1);

    }

    printf("\nReceipt 2 total: \n");

    for (a = 0; a < 10; a++)

    {

        printf("%2.2f", RCT2);

    }

    printf("\nTotal of receipts combined; \n");

    for (a = 0; a < 10; a++)

    {

        printf("%2.2f", TOT);

    }

 

    return 0;

 

}

Homework Help/Study Tips, Others

  • Category:- Homework Help/Study Tips
  • Reference No.:- M9862506

Have any Question?


Related Questions in Homework Help/Study Tips

Question select one of the following Question: Select one of the following disorders: •

Question: Select one of the following disorders: • Depressive disorder • Generalized anxiety disorder • Attention deficit hyperactivity disorder • Obsessive-compulsive disorder Create a Microsoft® PowerPoint® presentatio ...

This weeks assignment is the second part of a three-part

This week's assignment is the second part of a three-part Course Project which requires you to develop a financial plan for a department within an institution of higher education. Continue using the "Develop a Financial ...

Question choose one of the four following visuals1 image

Question: Choose one of the four following visuals: 1. Image courtesy of: Nike® 2013 advertisement 2. Image courtesy of: Parents magazine June 2011 3. Image courtesy of: Harley Davidson® advertisement 4. Image courtesy o ...

Question nursing research is used to study a dilemma or a

Question: Nursing research is used to study a dilemma or a problem in nursing. Examine a problem you have seen in nursing. Why should it be studied? Justify your rationale. The response must be typed, single spaced, must ...

Question a u-form firms management is considering an

Question: A U-form firm's management is considering an important decision that will affect the entire company. Why don't they just set up a meeting attended by delegates from the various departments? Each delegate will b ...

Question instructionsread wl gore amp associates on pages

Question: Instructions: Read W.L. Gore & Associates on Pages 257-259 of the textbook. After reading the information, write a response to the case by addressing questions 1 through 6, located at the end of the case. Your ...

Question 1 after having read the case study analysis on

Question: 1. After having read the case study analysis on Team Dynamics at Initech, fill out the Organizational Diagnosis Questionnaire (ODQ) developed by Preziosi. You are not required to answer all questions. For some ...

In the next few weeks you will be working on developing

In the next few weeks you will be working on developing your Key Assignment Project. The Key Assignment will be a Business Case that will consist of the following components: Section 1 - Overview of Company and Client Bu ...

Question how might considering the role of the victim in

Question: How might considering the role of the victim in efforts to understand and explain victimization contribute to victim blaming? Should victim behavior be included in such discussions? Why or why not? The response ...

Persuasive speech guidelines objectivesyou will1construct a

Persuasive Speech Guidelines Objectives: You will: 1. Construct a carefully formulated specific purpose statement and thesis statement suitable for an original 4-6 minute persuasive speech using the Problem-Solution Orga ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As