Absolute C++ Chapter 1 Self-Test Exercise(1)

Chapter 1

Self-test exercises

1. int feet=0, inches=0; or int feet(0),inches(0);
2. int count=0;
double distance=1.5; or
  int count(0);
  double distance(1.5);
3.
#include <iostream>
using namespace std;
int main()
{
  int a1,a2,a3,a4,a5,a6,a7;
  count<< a1<<" "<<a2<<" "<<a3<<" "<<a4<<" "<<a5<<" "<<a6<<" "<<a7<<"\n";
  return 0
}
posted @ 2012-05-03 14:21  terryhan  阅读(158)  评论(0)    收藏  举报