摘要: 1815. 计算两点间的距离Description请用类描述顶点信息,输入两点坐标(X1,Y1),(X2,Y2),计算并输出两点间的距离。Input输入数据第一行一个整数 n,代表测试数据组数,接下来 n 行,每行由 4 个实数组成,分别表示 x1,y1,x2,y2,数据之间用空格隔开。Output对于每组测试数据,输出一行,结果保留两位小数。Sample InputCopy sample input to clipboard20 0 0 10 1 1 0Sample Output1.001.41 1 #include <iostream> 2 #include <ioman 阅读全文
posted @ 2011-11-22 13:31 _Echo_ 阅读(203) 评论(0) 推荐(0) 编辑
摘要: Page 80, Listing 3.5. Use the tax rate listed in Table 3.6 to calculate personal tax.Input 24 pairs of status (integer) and income (double) and print the corresponding tax.Hint: Think about how to simplify your program.书本80页,列表3.5。使用税表3.6计算美国的个人税。读入24对个人状况(以整数描述)和收入(以实数描述),然后打印出对应的税。提示:本题难度较大,先想想如何简 阅读全文
posted @ 2011-11-21 21:33 _Echo_ 阅读(115) 评论(0) 推荐(0) 编辑