• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
 






yogurt_莹

 
 

Powered by 博客园
博客园 | 首页 | 新随笔 | 联系 | 订阅 订阅 | 管理

2018年9月30日

2007.平方和与立方和
摘要: #include<stdio.h> int main(){ int x=0,y=0,m,n,t,i; scanf("%d%d",&m,&n); if(m>n){ t=m;m=n;n=t; } for(i=m;i<=n;i++){ {if(i%2==0)x+=i*i; else y+=i*i*i; } 阅读全文
posted @ 2018-09-30 22:51 yogurt_莹 阅读(88) 评论(0) 推荐(0)
 
2006.求奇数的乘积
摘要: #include<stdio.h> int main(){ int n,a[10],i,sum=1; scanf("%d",&n); for(i=0;i<n;i++) scanf("%d",&a[i]); for(i=0;i<n;i++){ if(a[i]%2!=0) sum*=a[i];} pri 阅读全文
posted @ 2018-09-30 22:45 yogurt_莹 阅读(90) 评论(0) 推荐(0)
 
2005.第几天?
摘要: #include<stdio.h> int main(){ int day=0,y=0,m=1,d=0; scanf("%d/%d/%d",&y,&m,&d); switch(m-1){ case 11:day+=30; case 10:day+=31; case 9:day+=30; case 8 阅读全文
posted @ 2018-09-30 22:36 yogurt_莹 阅读(55) 评论(0) 推荐(0)
 
2004.成绩转换
摘要: #include<iostream> using namespace std;int main(){ int a; cin>>a; if(90<=a<=100)cout<<"A"<<endl; else if(80<=a<90)cout<<"B"<<endl; else if(70<=a<80)co 阅读全文
posted @ 2018-09-30 22:35 yogurt_莹 阅读(89) 评论(0) 推荐(0)
 
2003.求绝对值
摘要: #include<stdio.h> int main(){ float a; scanf("%f",&a); if(a>0)printf("%.2f",a); else {a=a*(-1); printf("%.2f",a); } return 0; } Problem Description 求实 阅读全文
posted @ 2018-09-30 22:06 yogurt_莹 阅读(88) 评论(0) 推荐(0)
 
2002.计算球体积
摘要: #include<stdio.h> #define PI 3.1415927 int main(){ float r,v; scanf("%f",&r); v=((PI*r*r*r)*4)/3; printf("%.3f",v); return 0; } Problem Description 根据 阅读全文
posted @ 2018-09-30 00:02 yogurt_莹 阅读(95) 评论(0) 推荐(0)