摘要: 不贴题目了,描述的很复杂,其实这个题主要是考察简单的逻辑设计问题吧,看了其他人的答案,有的地方没看懂,还是用麻烦的if else解决的:#include<iostream>#include<iomanip>#include<math.h>using namespace std;int main(){ char a; double t,d,h; while(cin>>a&&a!='E') { if(a=='T') { cin>>t>>a; if(a=='D') 阅读全文
posted @ 2012-10-18 15:14 响^_^ 阅读(198) 评论(0) 推荐(0) 编辑
摘要: Problem:DescriptionHow far can you make a stack of cards overhang a table? If you have one card, you can create a maximum overhang of half a card length. (We're assuming that the cards must be perpendicular to the table.) With two cards you can make the top card overhang the bottom one by half a 阅读全文
posted @ 2012-10-18 10:16 响^_^ 阅读(86) 评论(0) 推荐(0) 编辑