摘要: View Code 1 /* 2 题目:求1+2+…+n, 3 要求不能使用乘除法、for、while、if、else、switch、case等关键字以及条件判断语句(A?B:C)。 4 */ 5 6 7 class Calculation 8 { 9 public:10 Calculation()11 {12 ++n;13 sum+=n;14 }15 static void Reset()16 {17 n=0;18 sum=0;19 }20 static int GetS... 阅读全文
posted @ 2012-05-16 15:37 Cavia 阅读(365) 评论(0) 推荐(0) 编辑