白皮 Chapter 1
6.29 今天主要做了一些1.5中的小结和练习,果然换语言思路也要跟着变么…各种不爽啊不爽…
scanf各种忘记&,还有各种忘记return 0…
average
temperature
sum
sincos
distance
7.1 继续做习题…
#include<stdio.h>
#include<math.h> int main()
{
int n;
scanf("%d",&n);
if (n % ==) printf("no"); else printf("yes");
return ;
}
odd
#include<stdio.h>
#include<math.h> int main()
{
int s,n;
double m;
scanf("%d",&n);
s=*n;
if (s>=) m=((float) s)*0.85; else m=(float) s;
printf("%.2lf",m);
return ;
}
discount
#include<stdio.h>
#include<math.h> int main()
{
double a;
scanf("%lf",&a);
if (a<) a=-a;
printf("%.2lf",a);
return ;
}
abs
#include<stdio.h>
#include<math.h> int main()
{
int a,b,c,t;
scanf("%d%d%d",&a,&b,&c);
//sort
if (a>b) {t=a;a=b;b=t;}
if (a>c) {t=a;a=c;c=b;}
if (b>c) {t=b;b=c;c=t;}
//determine
if (c<a+b) {
if (c*c==a*a+b*b) printf("yes"); else printf("no");
}
else printf("not a triangle");
return ;
}
triangle
#include<stdio.h>
#include<math.h> int main()
{
int y;
scanf("%d",&y);
if (y%==){
if (y%==) printf("yes");
else {if (y%==) printf("no"); else printf("yes");}
}
else printf("no");
return ;
}
year
白皮 Chapter 1的更多相关文章
- 白皮 Chapter 2
7.2 做题一遍就过的感觉简直太美好啦~然而我并没有测试数据QAQ //program name digit #include<cstdio> #include<iostream&g ...
- Modern C++ CHAPTER 2(读书笔记)
CHAPTER 2 Recipe 2-1. Initializing Variables Recipe 2-2. Initializing Objects with Initializer Lists ...
- Android Programming: Pushing the Limits -- Chapter 7:Android IPC -- ApiWrapper
前面两片文章讲解了通过AIDL和Messenger两种方式实现Android IPC.而本文所讲的并不是第三种IPC方式,而是对前面两种方式进行封装,这样我们就不用直接把Aidl文件,java文件拷贝 ...
- Android Programming: Pushing the Limits -- Chapter 7:Android IPC -- Messenger
Messenger类实际是对Aidl方式的一层封装.本文只是对如何在Service中使用Messenger类实现与客户端的通信进行讲解,对Messenger的底层不做说明.阅读Android Prog ...
- [转]第四章 使用OpenCV探测来至运动的结构——Chapter 4:Exploring Structure from Motion Using OpenCV
仅供参考,还未运行程序,理解部分有误,请参考英文原版. 绿色部分非文章内容,是个人理解. 转载请注明:http://blog.csdn.net/raby_gyl/article/details/174 ...
- 《深入理解计算机系统》 Chapter 7 读书笔记
<深入理解计算机系统>Chapter 7 读书笔记 链接是将各种代码和数据部分收集起来并组合成为一个单一文件的过程,这个文件可被加载(货被拷贝)到存储器并执行. 链接的时机 编译时,也就是 ...
- 《Linux内核设计与实现》Chapter 3 读书笔记
<Linux内核设计与实现>Chapter 3 读书笔记 进程管理是所有操作系统的心脏所在. 一.进程 1.进程就是处于执行期的程序以及它所包含的资源的总称. 2.线程是在进程中活动的对象 ...
- PRML Chapter 2. Probability Distributions
PRML Chapter 2. Probability Distributions P68 conjugate priors In Bayesian probability theory, if th ...
- PRML Chapter 1. Introduction
PRML Chapter 1. Introduction 为了防止忘记,要把每章的重要内容都记下来,从第一章开始 2012@3@28 今天又回去稍微翻了一下第一章内容,发现第一次看的时候没有看透,每次 ...
随机推荐
- 【iOS实现一个颜色渐变的弧形进度条】
在Github上看到一些进度条的功能,都是通过Core Graph来实现.无所谓正确与否,但是开发效率明显就差很多了,而且运行效率还是值得考究的.其实使用苹果提供的Core Animation能够非常 ...
- ichart.js绘制虚线 ,平均分虚线
var Data=new Array(); Data[0] = { labels : ["第一单元","第二单元","第三单元"," ...
- python成长之路【第十篇】:浅析python select模块
一.select介绍 select()的机制中提供一fd_set的数据结构,实际上是一long类型的数组, 每一个数组元素都能与一打开的文件句柄(不管是Socket句柄,还是其他文件或命名管道或设备句 ...
- php访问远程服务器上的文件
test.php <?php $fp=fopen('http://www.baidu.com', 'r'); while (!feof($fp)) { $chunk=fgets($fp); ec ...
- 菜鸟学自动化测试(一)---- selenium IDE
http://www.cnblogs.com/fnng/archive/2011/10/23/2222157.html
- openssl evp RSA 加密解密
openssl evp RSA 加密解密 可以直接使用RSA.h 提供的接口 如下测试使用EVP提供的RSA接口 1. EVP提供的RSA 加密解密 主要接口: int EVP_PKEY_encryp ...
- h5
1. 在iPhone 手机上默认值是(电话号码显示为拨号的超链接): <meta name="format-detection" content="telephon ...
- centos mysql 安装及配置
安装Mysql 1 Centos 6.6下安装Mysql很简单, yum list mysql-server 2 当只有一个时候就可以直接 yum install mysql-server 进行安 ...
- SPSS数据分析—配对Logistic回归模型
Lofistic回归模型也可以用于配对资料,但是其分析方法和操作方法均与之前介绍的不同,具体表现 在以下几个方面1.每个配对组共有同一个回归参数,也就是说协变量在不同配对组中的作用相同2.常数项随着配 ...
- nodejs 服务端添加相应头Access-Control-Allow-Origin
重点在这句:res.setHeader("Access-Control-Allow-Origin", "*"); var http = require(&quo ...