OpenJudge1.3 答案
01:A+B问题
#include <stdio.h>
#include <stdlib.h>/* run this program using the console pauser or add your own getch, system("pause") or input loop */int main(int argc, char *argv[])
{int a,b,c;scanf("%d %d",&a,&b);c=a+b;printf("%d",c);return 0;
}
02:计算(a+b)*c的值
#include <stdio.h>
#include <stdlib.h>/* run this program using the console pauser or add your own getch, system("pause") or input loop */int main(int argc, char *argv[])
{int a,b,c,d;scanf("%d %d %d",&a,&b,&c);d=a+b;a=d*c;printf("%d",a);return 0;
}
03:计算(a+b)/c的值
#include <stdio.h>
#include <stdlib.h>/* run this program using the console pauser or add your own getch, system("pause") or input loop */int main(int argc, char *argv[])
{int a,b,c,d;scanf("%d %d %d",&a,&b,&c);d=a+b;a=d/c;printf("%d",a);return 0;
}
04:带余除法
#include <stdio.h>
#include <stdlib.h>/* run this program using the console pauser or add your own getch, system("pause") or input loop */int main(int argc, char *argv[])
{int a,b,c,d;scanf("%d %d",&a,&b);//d=a+b;c=a/b;d=a%b;printf("%d %d",c,d);return 0;
}
05:计算分数的浮点数值
#include <stdio.h>
#include <stdlib.h>/* run this program using the console pauser or add your own getch, system("pause") or input loop */int main(int argc, char *argv[])
{int a,b;double c,d,e;scanf("%d %d",&a,&b);c=a;d=b;e=c/d;//d=a%b;printf("%.9f",e);return 0;
}
06:甲流疫情死亡率
#include <stdio.h>
#include <stdlib.h>/* run this program using the console pauser or add your own getch, system("pause") or input loop */int main(int argc, char *argv[])
{int a,b;double c;scanf("%d %d",&a,&b);c=((double)b)/((double)a);printf("%.3f%%",c*100);return 0;
}
07:计算多项式的值
#include <stdio.h>
#include <stdlib.h>
#include <math.h>/* run this program using the console pauser or add your own getch, system("pause") or input loop */int main(int argc, char *argv[])
{double a,b,c,d,e,x;scanf("%lf %lf %lf %lf %lf ",&x,&a,&b,&c,&d);e=a*pow(x,3)+b*pow(x,2)+c*pow(x,1)+d;printf("%.7lf",e);return 0;
}
OpenJudge1.3 答案相关推荐
- Openjudge1.3答案
Openjudge1.3答案 01 #include<stdio.h> #include<math.h> int main() {int a,b,c;scanf("% ...
- Openjudge1.4答案
Openjudge1.4答案 01 #include <stdio.h> int main() {long a;scanf("%ld",&a);if(a==0) ...
- OpenJudge1.6答案
01:与指定数字相同的数的个数 #include <stdio.h> #include <math.h> #include <stdlib.h>/* run thi ...
- [转]信息安全相关理论题(三)
21.静态分析是运行程序后进行调试? A. 对 B. 错 您的答案: 标准答案: B 22.安卓反编译后会出现$符号字节码表示是匿名内部类? A. 对 B. 错 您的答案: 标准答案: A 23.反编 ...
- openJudge1.4题库1~5题答案答案
这里是c++的地盘,c语言的什么东西我不知道,反正我写的代码都是c++的,呵呵.. 第一题 给定一个整数N,判断其正负. 这玩意儿太简单了,我就不多说了,直接上代码 #include<bits/ ...
- openjudge1.1所有答案
网址 OpenJudge - OpenJudge - 题目http://noi.openjudge.cn/ch0101/ 01:Hello, World! 描述 对于大部分编程语言来说,编写一个能够输 ...
- 华东理工大学计算机应用基础,最新华东理工大学计算机应用基础网上作业及全部答案...
精品文档 华东理工大学计算机应用基础网上作业及全部答案 2012计算机应用基础答案: 一.选择题 1.文件夹是用来对应用程序.文件进行分组的,以下说法中()正确.答:一个文件夹内可以包含文件.应用程序 ...
- 山西农业大学c语言答案,第一章C语言及程序设计概述-东北农业大学教务处.doc...
全国高等农林院校"十一五"规划教材 C语言程序设计 孙力 主编 中国农业出版社 内容简介 本书是全国高等农林院校"十一五"规划教材之一. 全书共11章,分别介绍 ...
- 2016计算机二级java_2016计算机二级JAVA练习题及答案
2016计算机二级JAVA练习题及答案 21.下列选项中,不能输出100个整数的.是( ). A.for(int i=0;i<100;i++) System.out.println(i); B. ...
最新文章
- chown -R命令的使用
- Android 之自定义view实现水波纹效果
- hive - 自定义函数(超详细步骤,手把手的交)
- android studio创建第一个安卓程序加载html5页面(一)
- 成品开卡和测试架的区别_浅析花盆与花箱阳台,廊架和花架的区别
- AE光效插件Optical Flares for Mac出现不显示预览缩略图,如何解决
- C# 类和结构的成员
- B/S神思SS628(100)身份证阅读器开发
- C - MaratonIME eats japanese food
- 杂谈:微信推出赞赏码功能
- shell编程阶段性总结+几个shell脚本实例
- 2021福建漳州高考成绩查询,2021年漳州高考成绩排名及成绩公布时间什么时候出来...
- 微信小程序云开发 · 从0搭建商业级校园跑腿平台(已开源)
- GPU Counter功能更新|支持Adreno、PowerVR芯片
- 用Python破解摩斯密码
- EXCEL打印表格时如何添加带有公司名称的水印
- Python利用SMTP/IMTP制作简单邮件(QQ邮箱)发送程序(保姆级)
- 醉月湖畔,为谁染红妆
- Ubuntu 16.04卸载LibreOffice等不常用软件
- 别再纠结于那些自动化测试不得不面对的现实z