Forum: C++ Aug 25th, 2009 |
| Replies: 5 Views: 321 Well, you can try this:
int findSum (vector < int > v){
int sum = 0;
if(v.size() <= 0) return 0;
else{
position = v.size() - 1;
sum += v.at(position);
... |
Forum: C++ Aug 19th, 2009 |
| Replies: 2 Views: 232 put
total += length,
total += length/3.208,
total += ((length / 12) * 3.2808);
in their respective places. Note D += A is shorthand for D = D + A
Dont forget to terminate the statements. |