白皮 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 今天又回去稍微翻了一下第一章内容,发现第一次看的时候没有看透,每次 ...
随机推荐
- 关于DSP的boot mode / boot loader /上电顺序 /在线升级等问题的总结
使用器件 ti dsp c2000 2837x 1.dsp的上电过程和boot mode以及boot loader 1)dsp的上电顺序, 对于双核系统而言 , 他的上电启动顺序如下所示: 系统复位或 ...
- Mifare系列5-存储结构(转)
文/闫鑫原创转载请注明出处http://blog.csdn.net/yxstars/article/details/38081521 Mifare S50把1K字节的容量分为16个扇区(Sector0 ...
- BLE教程 - 官方tutorial翻译
关键术语和概念 1. Generic Attribute Profile(GATT)GATT配置文件是一个通用规范,用于在BLE链路上发送和接收被称为"属性"的数据块.目前所有的B ...
- matlab播放音乐
最近在做计算,写了一些matlab代码,脑壳还疼,所以决定发挥一下逗B精神,写一个程序玩一下. 想了想,既然写代码的时候喜欢听歌,而且我的电脑打开网易音乐的速度巨慢(不知道为什么..),那些一个程序直 ...
- 理解RESTful
REST全称为Representational State Transfer,可以翻译为“表现状态转换”,是由是Roy Thomas Fielding在他2000年的博士论文中提出的,目的是为了得到一 ...
- jQuery.eq() 函数
eq() 函数 获取当前对象中指定索引所对应的的元素 语法 $selector.eq(index)//index为指定索引,值为数字型 返回值 返回值为一个对象 实例说明 代码 <!DOCTYP ...
- Android 动画分类
一:Tween Animation 动画类型 下面先来看看Android提供的动画类型.Android的animation由四种类型组成 在XML文件中: alpha 渐变透明度动画效果 ...
- mac 安装php7
卸载php55 brew unlink php55 brew install homebrew/php/php70 安装成功信息 To enable PHP in Apache add the fol ...
- centos中安装字体
转载自:http://blog.csdn.net/wlwlwlwl015/article/details/51482065 在使用phantomjs做自动化网页截图时,发现截图都没有文字.最后好久才发 ...
- 解决ora-00054 Oracle锁表问题
1.运行sql: select session_id from v$locked_object; 查出锁表的session,可能很多,正常是没有的 2.SELECT sid, serial#, u ...