home *** CD-ROM | disk | FTP | other *** search
/ Boston 2 / boston-2.iso / DOS / PROGRAM / C / CTUTOR / ANSWERS.ZIP / CH04_1.CPP < prev    next >
C/C++ Source or Header  |  1990-07-20  |  563b  |  29 lines

  1.                               // Chapter 4 - Programming exercise 1
  2. #include "iostream.h"
  3.  
  4. void do_stuff(float wings, float feet, char eyes);
  5.  
  6. main()
  7. {
  8. int arm = 2;
  9. float foot = 1000.0;
  10. char lookers = 2;
  11.  
  12.    do_stuff(3, 12.0, 4);
  13.    do_stuff(arm, foot, lookers);
  14. }
  15.  
  16. void do_stuff(int wings, float feet, char eyes)
  17. {
  18.    cout << "There are " << wings << " wings." << "\n";
  19.    cout << "There are " << feet << " feet." << "\n";
  20.    cout << "There are " << eyes << " eyes." << "\n\n";
  21. }
  22.  
  23.  
  24.  
  25.  
  26. // Result of execution
  27. //
  28. // (No result - errors)
  29.