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的更多相关文章

  1. 白皮 Chapter 2

    7.2 做题一遍就过的感觉简直太美好啦~然而我并没有测试数据QAQ //program name digit #include<cstdio> #include<iostream&g ...

  2. Modern C++ CHAPTER 2(读书笔记)

    CHAPTER 2 Recipe 2-1. Initializing Variables Recipe 2-2. Initializing Objects with Initializer Lists ...

  3. Android Programming: Pushing the Limits -- Chapter 7:Android IPC -- ApiWrapper

    前面两片文章讲解了通过AIDL和Messenger两种方式实现Android IPC.而本文所讲的并不是第三种IPC方式,而是对前面两种方式进行封装,这样我们就不用直接把Aidl文件,java文件拷贝 ...

  4. Android Programming: Pushing the Limits -- Chapter 7:Android IPC -- Messenger

    Messenger类实际是对Aidl方式的一层封装.本文只是对如何在Service中使用Messenger类实现与客户端的通信进行讲解,对Messenger的底层不做说明.阅读Android Prog ...

  5. [转]第四章 使用OpenCV探测来至运动的结构——Chapter 4:Exploring Structure from Motion Using OpenCV

    仅供参考,还未运行程序,理解部分有误,请参考英文原版. 绿色部分非文章内容,是个人理解. 转载请注明:http://blog.csdn.net/raby_gyl/article/details/174 ...

  6. 《深入理解计算机系统》 Chapter 7 读书笔记

    <深入理解计算机系统>Chapter 7 读书笔记 链接是将各种代码和数据部分收集起来并组合成为一个单一文件的过程,这个文件可被加载(货被拷贝)到存储器并执行. 链接的时机 编译时,也就是 ...

  7. 《Linux内核设计与实现》Chapter 3 读书笔记

    <Linux内核设计与实现>Chapter 3 读书笔记 进程管理是所有操作系统的心脏所在. 一.进程 1.进程就是处于执行期的程序以及它所包含的资源的总称. 2.线程是在进程中活动的对象 ...

  8. PRML Chapter 2. Probability Distributions

    PRML Chapter 2. Probability Distributions P68 conjugate priors In Bayesian probability theory, if th ...

  9. PRML Chapter 1. Introduction

    PRML Chapter 1. Introduction 为了防止忘记,要把每章的重要内容都记下来,从第一章开始 2012@3@28 今天又回去稍微翻了一下第一章内容,发现第一次看的时候没有看透,每次 ...

随机推荐

  1. oracle,mysql,SqlServer三种数据库的分页查询的实例。

    MySql: MySQL数据库实现分页比较简单,提供了 LIMIT函数.一般只需要直接写到sql语句后面就行了.LIMIT子 句可以用来限制由SELECT语句返回过来的数据数量,它有一个或两个参数,如 ...

  2. iOS获取当前时间

    NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; // ----------设置你想要的格式,hh与HH的区别:分别表示12小时 ...

  3. final finally finalize

    final  //如果不是final 的话,我可以在checkInt方法内部把i的值改变(有意或无意的,       //虽然不会改变实际调用处的值),特别是无意的,可能会引用一些难以发现的BUG   ...

  4. IE7中绝对定位元素之间的遮盖问题

    由于页面复杂就不上现实例子,举例说明. 两个同层级<div>元素,都设置了 position: relative;相对定位. 他们的内部的元素(不管什么元素了)都设置了position: ...

  5. [bzoj1935][shoi2007]Tree 园丁的烦恼(树状数组+离线)

    1935: [Shoi2007]Tree 园丁的烦恼 Time Limit: 15 Sec  Memory Limit: 357 MBSubmit: 980  Solved: 450[Submit][ ...

  6. [Java] Java解析XML格式Response后组装成Map

    //Get and Parse Response def response = context.expand(‘${TestStepName#Response}’) def xmlParser = n ...

  7. linux centos yum安装LAMP环境

    centos 6.5 1.yum安装和源代码编译在使用的时候没啥区别,但是安装的过程就大相径庭了,yum只需要3个命令就可以完成,源代码需要13个包,还得加压编译,步骤很麻烦,而且当做有时候会出错,源 ...

  8. JQuery筛选器全系列介绍

    jQuery提供了强大的选择器让我们获取对象.在这边,我人为地将jQuery选择器分为两大部分:选择对象和筛选条件.选择对象表示要获取什么对象,筛选条件是对获取的对象进行筛选,最终留下符合某些特征的对 ...

  9. Sudoku 数独游戏

    #include<iostream> using namespace std; bool heng(int **sudo, int a, int b, int value) { bool ...

  10. 使用scrapy创建工程

    前提:先创建一个文件夹用来存放爬虫工程 创建项目命令: scrapy startproject <project_name> 例子: scrapy startproject myproje ...