At 15:08 2007-02-05, Robert Ryan wrote:
the out it gives is -
the total is: -20, but I don't see how on Visual C++
Huh? don't see how "what" on Visual C++
and what did you initialize the array with??
"Victor A. Wagner Jr." <[EMAIL PROTECTED]> wrote:
At 18:21 2007-02-04, Robert Ryan wrote:
ok, correct.............
it was at the end of the messsage
"Victor A. Wagner Jr." <[EMAIL PROTECTED]> wrote:
At 10:33 2007-02-04, Robert Ryan wrote:
what would make it look better.
you mean correct?
"Victor A. Wagner Jr." <[EMAIL PROTECTED]> wrote:
At 18:48 2007-02-03, Robert Ryan wrote:
int array_one[ 25 ];
> > int *array_two = new int[ 25 ];
if you wanted to total up the ints, how would you do it.
for(int i=0; i<array_one; i++) {
total += array_one [i];
and then cout << "The total Is: " <<; }
no, not even close
what is "i<array_one" supposed to do?
#include <iostream>
#include <numeric>
using namespace std;
int main()
{
int array_one[25];
/* some code to put stuff in array_one */
int total = accumulate(array_one, array_one+25, 0);
cout << "The total is: " << total << endl;
}
[deleted]
Victor A. Wagner Jr. http://rudbek.com
The five most dangerous words in the English language:
"There oughta be a law"
Need Mail bonding?
Go to the
<http://answers.yahoo.com/dir/index;_ylc=X3oDMTFvbGNhMGE3BF9TAzM5NjU0NTEwOARfcwMzOTY1NDUxMDMEc2VjA21haWxfdGFnbGluZQRzbGsDbWFpbF90YWcx?link=ask&sid=396546091>Yahoo!
Mail Q&A for
<http://answers.yahoo.com/dir/index;_ylc=X3oDMTFvbGNhMGE3BF9TAzM5NjU0NTEwOARfcwMzOTY1NDUxMDMEc2VjA21haWxfdGFnbGluZQRzbGsDbWFpbF90YWcx?link=ask&sid=396546091>great
tips from Yahoo! Answers users.
Victor A. Wagner Jr. http://rudbek.com
The five most dangerous words in the English language:
"There oughta be a law"