摘要: 9.cout<<"The answer to the question of /n" <<"Life, the Universe, and Everything is 42./n";10.cout<<"Enter a whole number.";cin>>theNumber;11.cout.setf(ios::fixed);cout.setf(ios::showpoint);cout.precision(3);12.#include<iostream>using names 阅读全文
posted @ 2012-05-05 15:43 terryhan 阅读(190) 评论(0) 推荐(0)
摘要: 4.(1)3*x (2)3*x+y (3) (x+y)/7 (4)(3*x+y)/(z+2)5. bcbc6. 07.#include <iostream>using namespace std;int main( ){ int num1,num2; cout<<"Enter the divendend:"; cin>>num1 cout<<"Enter the divisor:"; cin>>num2; quotient=num1/num2; remainder=num1%num2; cout 阅读全文
posted @ 2012-05-05 14:20 terryhan 阅读(230) 评论(0) 推荐(0)
摘要: Chapter 1Self-test exercises1. 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<<" 阅读全文
posted @ 2012-05-03 14:21 terryhan 阅读(159) 评论(0) 推荐(0)