摘要: #include <stdio.h> int ride(int n) { //递归阶乘 if (n == 1) { return 1; }//当n=1的时候结束。 else if(n>1){ return n * ride(n - 1);//返回相乘的值 } else { return 0; } } 阅读全文
posted @ 2020-10-31 17:49 onedust 阅读(258) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <stdlib.h> float sum(float a, char c,float b,float sum) { switch (c) { case '+':sum=a+b;break; case '-':sum=a-b;break; cas 阅读全文
posted @ 2020-10-31 17:45 onedust 阅读(870) 评论(0) 推荐(0)