Can you give some advices on this problem??

perl Malaysia
  • 15 years ago

    Problem

    Write a C++ program that manipulates an array of 10 data elements (numbers). The elements are initiated during run-time. Efficiently implement the following tasks:

    1. Display the smallest and largest values in the array.
    2. Calculate and display the total and average of all the values.
    3. Get a numeric value from user and multiply all the array elements with this value. Update the array with the respective multiplication results.
    4. Build a function called reverseArray that reverses the elements of the array so that the last element becomes the first, the second element from the last becomes the second, and so forth. The function should take two arguments/parameters: the array and its size. This process must be done without using another array.

    Hi, dude!!!  Nice to meet you!!! Would you mind to give me some advices or some hints on this problem?? Actually, i have attempted on this problem but i but can't solve this problem efficiently especially the first portion. I did wirte a programme to display the maximum value but i have no idea of how to display the maximum value and the minimum value at the same time. Actually, it has to be done within the same function. In addtion, i'm just a beginner of C++ programming and this problem really drives me nuts.  Would you mind to lend me your hand?? Thank You!!!

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“The greatest performance improvement of all is when a system goes from not-working to working.” - John Ousterhout