比着葫芦画瓢
来源:互联网 发布:东莞网络电视剧 编辑:程序博客网 时间:2024/06/10 00:54
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
int t;
float x,y;
scanf("%f",&x);
t=(x<2)+(x<6)+(x<10);
switch(t)
{
case 3:y=x;break;
case 2:y=x*x+1;break;
case 1:y=sqrt(x+1);break;
case 0:y=1/(x+1);break;
}
printf("%f",y);
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int main()
{
int c,s;
float p,w,d,f;
printf("please enter p,w,s:");
scanf("%f%f%d",&p,&w,&s);
if (s>=3000)
c=12;
else
c=s/250;
switch(c)
{
case 0:d=0;break;
case 1:d=2;break;
case 2:
case 3:d=5;break;
case 4:
case 5:
case 6:
case 7:d=8;break;
case 8:
case 9:
case 10:
case 11:d=10;break;
case 12:d=15;break;
}
f=p*w*s*(1-d/100.0);
printf("freight=%.2f\n",f);
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int main()
{
int x,y;
scanf("%d",&x);
y=(x>0)?x:-x;
printf("%d",y);
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int main()
{
double x;
scanf("%lf",&x);
printf("%lf",(x>0)?x:-x);
return 0;
}
- 比着葫芦画瓢
- MFC-求方程的根(比着葫芦画个瓢)
- 按下葫芦起了瓢
- 看着葫芦在加拿大Unotelly
- Google也有"漏洞"-按倒葫芦起来瓢
- 看着葫芦从美国以外的地区使用VPN
- 宝葫芦
- 依瓢画葫芦
- 象牌手拉葫芦
- 宝葫芦
- 宝葫芦
- 葫芦僧判断葫芦案
- 葫芦艾灸,葫芦灸养生技术。
- 软件开发血泪史---按下葫芦起来瓢
- 按下葫芦又起瓢 新政催热北京周边楼市
- 顶级葫芦VPN
- 葫芦又被偷了
- 【面经】葫芦面经
- 云帮系列文章:核心组件介绍
- [Leetcode] Single Number
- MySQL删除所有数据时报错
- Android基本控件
- RadioGroup 全部取消选中 和选中某个按钮
- 比着葫芦画瓢
- 实现简单的微信公众号开发
- Android studio Error:(1, 1) 错误: 非法字符: '\ufeff'
- 高并发高负载系统架构-php篇
- 从2级C中了解数据库基础
- 环境传感器
- 分段函数求值
- 六、TIM普通定时器
- android中加载Gif图片