白皮 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 今天又回去稍微翻了一下第一章内容,发现第一次看的时候没有看透,每次 ...
随机推荐
- 《与小卡特一起学Python》Code3 抓取网页中的某个数据
import urllib2 file = urllib2.urlopen('http://common.cnblogs.com/script/jquery.js') message = file.r ...
- Vue2随笔
1. computed有缓存 methods没有缓存 慢慢更新中..... 2.Class与Style绑定 <div class="static" v-bind:class= ...
- 插件开发--BE插件开发
U9的插件主要分为3种,即(1)BE插件(2)UI插件(3)BP/SV插件 1.新建类库解决方案 2.新建插件类,并引用以下dll,UBF安装目录U9.VOB.Product.UBF\UBFStudi ...
- angularjs指令系统系列课程(5):控制器controller
这一节我们来说一下controller这个参数 一.指令控制器的配置方法: 对于指令我有两种配置路由的方式:1.在html中直接引用,2,在指令的controller参数里定义 第一种:在html中直 ...
- android线程登录
主入口代码: package com.tp.soft.app; import java.io.IOException; import java.util.HashMap; import java.ut ...
- JAVA 1.6 流程控制语句
1. 条件运算符(三元表达式),其形式为:type d = a ? b : c; 具体化形式为:int d = 2 < 1 ? 3 : 4;2. 轻量级的文本编辑器:UltraEdit.Edit ...
- AutoCAD .NET API 之——DimStyleTableRecord 的属性列表
DimStyleTableRecord Properties: Properties Description(描述) Dimadec 角度标注保留的有效位数 Dimalt 控制是否显示换算单位标注值中 ...
- ADO.NET 访问数据库
对数据库的访问时各种数据库应用程序开发的核心技术,.NET框架中提出的ADO.NET技术为应用程序的开发提供了一致的接口,增强了程序的可移植性和可扩展性. a:使用链接对象Connection连接数据 ...
- 解决VS2012编写JQuery代码不能智能提示的问题(其他js库的代码提示设置估计类似)
VS默认设置下编写jQuery代码是这样的: 解决办法: 1.在项目的"管理NuGet程序包"中安装JQuery: 2.打开:工具 -> 选项 -> 文本编辑器 -&g ...
- ionic ngCordova插件安装
ngCordova的安装配置 官网提供了两种安装的方法: 1. 使用bower来安装 2. 下载zip文件 推荐使用bower安装,在使用bower之前,我们电脑中需要先配置bower.bower的配 ...