摘要:
#includeint main(){ int year, month, day, sum=0, i; int mon[13]={0,31,28,31,30,31,30,31,31,30,31,30,31}; scanf("%d-%d-%d", &year, &month, &da... 阅读全文
posted @ 2015-11-11 21:05
striderdu
阅读(99)
评论(0)
推荐(0)
摘要:
用到了ceil和floor取整,ceil向上floor向下,参数都是double类实参#include#includeint main(){ float x; scanf("%f", &x); double p=ceil(x); if(p2&&p15) printf("%.6... 阅读全文
posted @ 2015-11-11 20:59
striderdu
阅读(126)
评论(0)
推荐(0)
摘要:
#includeint main(){ float I; scanf("%f", &I); if(I10&&I20&&I40&&I60&&I100) printf("%.6f\n", 10*0.1+10*0.075+20*0.05+20*0.03+40*0.015+(I-100)*... 阅读全文
posted @ 2015-11-11 20:54
striderdu
阅读(89)
评论(0)
推荐(0)
摘要:
#includeint main(){ int a, m, sum; scanf("%d", &a); m=a; sum=0; while(m!=0) { sum=sum*10+m%10; ... 阅读全文
posted @ 2015-11-11 20:52
striderdu
阅读(96)
评论(0)
推荐(0)
摘要:
#includefloat max(float x,float y){ float z=x>y?x:y; return z;}int main(){ float a, b, c, t; scanf("%f%f%f", &a, &b, &c); if(a>b){t... 阅读全文
posted @ 2015-11-11 20:48
striderdu
阅读(282)
评论(0)
推荐(0)
摘要:
用二分的前提是数据已经升序排好,切记切记#includeint BSearch(int A[],int n,int key)//A[]存放数据的数组;n数据个数;key要搜索内容{ int l, r, m; l=0,r=n-1; while(lkey)//向左查找 ... 阅读全文
posted @ 2015-11-11 20:36
striderdu
阅读(196)
评论(0)
推荐(0)

浙公网安备 33010602011771号