第八次上机
来源:互联网 发布:avmask永久域名 编辑:程序博客网 时间:2024/05/31 11:04
#include<stdio.h>void main(){int fact(int x);int a,b,num;scanf("%d%d",&a,&b);a=fact(a);b=fact(b);num=a*b;num=fact(num);printf("%d\n",num);}int fact(int c){int x=0;while(c!=0) {x=x*10+c%10;c=c/10;}return x;}
调试结果:
编的程序:
# include<stdio.h> int fact(int b); void main() { int n,sum; scanf("%d",&n); {sum=fact(n); printf("%d\n",sum);} } int fact(int b) { int a; if(b==1||b==2) a=b-1;else a=2*fact(b-1)+3*fact(b-2); return a; }
生成结果
#include<stdio.h> void main() { int a,i,y; printf("请输入一个正整数"); scanf("%d",&a); a=a+1;if(a<2)printf("质数是不能小于2,请重新输入\n");else {for(i=2;i<n;i++) { y=n%i; if(y==0) break; } if(i==a) printf("yes\n"); else printf("no\n"); }}
调试结果:
- 第八次上机
- 第八次上机试验报告
- 第八次上机实验
- 第八次上机实验
- 第八次上机任务
- 第八次上机实验
- 第八次上机实验
- 第八次上机
- 第八次上机报告
- 第八次上机实验
- 第八次上机
- 第八次上机实验
- 第八次上机任务
- 第八次上机实验
- 第八次上机作业
- 第八次上机实验
- 第八次上机报告
- 第八次上机
- C#常用文件操作
- 使用spring配置RMI
- Android资源目录---assets与res/raw区别
- jsp之监听器
- zencart忘记后台密码的解决办法
- 第八次上机
- C++ map key 指针相关
- linux / mac 安装drush
- Git详解之三:Git分支
- C/C++代码格式优化工具----astyle
- 2013百度校园招聘-机器学习和数据挖掘工程师-笔试题
- 第八次
- Xbox One:微软发布“改变一切”的新游戏机
- Linux 内核 Completely Fair Scheduler (cfs)调度算法