Homework Statement
say a[5] = { 5.6, -3.2, 11, -7.7, -1 );
and b = 5
void fum ( double a[], int b ){
for ( int i = b -1; i >= 0; i-- ){
if ( a[i] < 0 )
cout << -a[i];
else cout << a[i];
cout << ", ";
}
}
Why is the output
1, 7.7, 11, 3.2, 5.6
and not
7.7...