#include #include using namespace std; #include "vec5.h" int main() { vector u; vector v( 3.14, 2.73, 0.69 ); vector w = vector( -5, 8, -9 ); vector x( "7.1" ); cout.setf( ios::showpoint ); cout.setf( ios::fixed ); cout.precision( 3 ); u = vector( -3, 4, -5 ); cout << "u = "; show( u ); cout << endl; show( "v", v ); show( "w", w ); show( "x", x ); cout << endl;; show( "u + w", u.plus( w ) ); show( "v - u", v.minus( u ) ); show( "w + ( u - v )", w.plus( u.minus( v ) ) ); cout << "\n\n"; system( "PAUSE" ); return( EXIT_SUCCESS ); }