摘要: #include<stdio.h>int main(){int j=16,h=40,z,w;z=h/2-j;w=j-z;printf("兔数是:%d\n鸡数是:%d\n",z,w);return 0;}首先是分析,运用代数知识可知,Z=h/2-j;w=j-z;然后输出即可 阅读全文
posted @ 2012-05-14 21:55 尔滨之夏 阅读(220) 评论(0) 推荐(0) 编辑
摘要: 定义个函数,求最大的数,主函数再调用实现#include<stdio.h>int big(int a,int b){ int c; if(a>b) c=a; else c=b; return c;}int main(){ int a,b; while(scanf("%d%d",&a,&b)!=EOF) { printf("%d\n",big(a,b)); } return 0;} 阅读全文
posted @ 2012-05-14 20:49 尔滨之夏 阅读(145) 评论(0) 推荐(0) 编辑