上一页 1 ··· 3 4 5 6 7
  2015年4月15日
摘要: #includeint main(){int n,m,a,b,c;printf("请输入分子和分母:\n");scanf("%d%d",&n,&m);a=n;b=m;if(n>m){do{c=a%b;a=b;b=c;}while(c!=0);n=n/a; m=m/a;} else{ do{c=b%a... 阅读全文
posted @ 2015-04-15 20:29 码农er 阅读(560) 评论(2) 推荐(0) 编辑
  2015年4月11日
摘要: 下面的4个用户是我宿舍的,当然我是钱最多的,呵呵!#include#includeusing namespace std;class consumer{public: void int_consumer(string ,string ,string ,float ); //初始化 string ... 阅读全文
posted @ 2015-04-11 01:49 码农er 阅读(410) 评论(0) 推荐(1) 编辑
  2015年4月7日
摘要: 上大一,老师布置了一道题,内容就是:两个有理数相加(要求输入时以分数形式,输出时也以分数形式),这道题用了大概2个多小时吧(欢迎指导),废话不多说了,直接上程序:#includeusing namespace std;class rational{public:void setnumber(int ... 阅读全文
posted @ 2015-04-07 23:54 码农er 阅读(343) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7