- 博客(3)
- 收藏
- 关注
转载 c语言尾递归示例
尾递归函数定义: 1.一个函数中所有递归形式的调用都出现在函数的; 2.当递归调用是整个函数体中最后执行的语句且它的返回值不属于表达式的一部分; 尾递归函数优点: 1.占用内存空间少,运行效率更高。运行结果:1 + 1/2 + 1/3 + 1/4 + 1/5 = 2.28 Program ended with exit code: 0main.c#include <stdio.h>doubl
2015-10-13 22:59:24 592
转载 C语言void泛型指针
x = 7, y = 10 a = 1.33, b = 2.55 x = 10, y = 7 a = 2.55, b = 1.33 1 2 3 4 9 10 11 12 Program ended with exit code: 0main.c#include <stdio.h> #include <stdlib.h> // malloc #include <string.h> // memcp
2015-10-13 19:49:18 777
原创 C++ How to program 9E<10.9 hugeInt Class 函数运算符重载>
运行结果:a = 9000 a + 100 = 9100 a + 834 = 9834 100 + a = 9100 bye = 9000 Overflow, Product is over than 4-digits.main.cpp#include <iostream> #include <stdexcept> #include "Huge.hpp" #include <string>int m
2015-10-09 16:21:01 1736
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人