文件名称:1
介绍说明--下载内容均来自于网络,请自行研究使用
已知整数a,b,假设函数succ(x)=x+1,pred(x)=x-1,不许直接用‘+’、‘-’运算符号,也不许用循环语句,只能利用函数succ(x)和pred(x),试编写计算a+b,a-b的递归函数add(a,b),snb(a,b),并在主程序中验证该函数的正确性。
-Known integers a, b, assuming the function succ (x) = x+1, pred (x) = x-1, allowed the direct use of' +' ,' -' operational symbol, also not allowed to use the loop, only use the function succ (x) and pred (x), test preparation calculate a+ b, ab recursive function add (a, b), snb (a, b), and in the main program verify the correctness of the function.
-Known integers a, b, assuming the function succ (x) = x+1, pred (x) = x-1, allowed the direct use of' +' ,' -' operational symbol, also not allowed to use the loop, only use the function succ (x) and pred (x), test preparation calculate a+ b, ab recursive function add (a, b), snb (a, b), and in the main program verify the correctness of the function.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
1\1.cpp
.\11.cpp
.\12.cpp
1
.\11.cpp
.\12.cpp
1