2014年12月19日

【c语言】统计一个整数所包含的素因子并输出

摘要: #include#includeint prime(int n){ int i; if(n=sqrt(n)){ printf("素数:%d\n",n); return 1; } }void main(){ int i,n,count=0; while(1){ printf("请输入一个整数:"... 阅读全文

posted @ 2014-12-19 20:42 蜘蛛牛牛 阅读(1316) 评论(0) 推荐(0) 编辑

【c语言】比较两个分数的大小

摘要: #includeint divisor(int a,int b){ int temp=1; if(a0){ printf("a/b大于c/d!\n"); } if(m==0){ printf("a/b等于c/d!\n"); } if(m<0){ printf("a/b小于c/d!\n"); ... 阅读全文

posted @ 2014-12-19 20:25 蜘蛛牛牛 阅读(1590) 评论(0) 推荐(0) 编辑

导航