摘要: /* 题目: 输入数字n,按顺序打印从1到最大的n位十进制数。 如输入3,打印从1,2,3到999。 */ /* 思路: 大数问题转化为字符串或数组。 */ #include<iostream> #include<string.h> #include<algorithm> #include<cmat 阅读全文
posted @ 2019-11-14 21:19 笨宝宝 阅读(123) 评论(0) 推荐(0)
摘要: /* 题目: 实现函数double Power(double base,int exponent), 求base的exponent次方。 */ /* 思路: 本题需要考虑的情况较多: 1、0的负数次方报错。 2、判断double值为0,需要使用精度。 3、考虑exponent为负数的情况。 可创新的 阅读全文
posted @ 2019-11-14 20:00 笨宝宝 阅读(130) 评论(0) 推荐(0)