摘要: #include <stdio.h> int to_binary(int a); int main() { //求一个整数(十进制)的二进制(循环语句版) int a = 1234; int result; int shang; int size; int re; int b = a; int c 阅读全文
posted @ 2021-06-25 20:18 学而不思则罔! 阅读(206) 评论(0) 推荐(0)
摘要: #include <stdio.h> long fact(int a); //计算指定参数的阶乘 int main() { //用循环求a的阶乘(注意输入参数不要超过12,会超过long的范围) int a = 4; long resutl = 1; for (int i = 1; i <= a; 阅读全文
posted @ 2021-06-25 20:06 学而不思则罔! 阅读(264) 评论(0) 推荐(0)