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. [iOS][issis] requestLocationWithReGeocode AMapLocationErrorDomain Code=5 "取消"

    Tip: IOS 使用高德地图一次定位  (在该博客找到了解决答案) 在定位时如果出现下面这个Error,说明你的locationManager没有设置成全局变量,导致locationManager提 ...

  2. Download Free Oracle Reports Building Guide eBook

    A very nice ebook on building reports in Oracle fusion middleware 11g. This manual is intended for a ...

  3. Codeforces Round #389 (Div. 2, Rated, Based on Technocup 2017 - Elimination Round 3) D. Santa Claus and a Palindrome STL

    D. Santa Claus and a Palindrome time limit per test 2 seconds memory limit per test 256 megabytes in ...

  4. 修改CMD字符编码

    1.参考网址: 1.1.http://blog.useasp.net/archive/2012/04/24/how_to_use_UTF8_encoding_in_Windows_CMD.aspx 1 ...

  5. (十六)getsockname()

    简述: 获取一个套接口的本地名字. #include <winsock.h> int PASCAL FAR getsockname( SOCKET s, struct sockaddr F ...

  6. 【java基础】面向对象的三大特征---多态

    java的引用变量有两种类型,编译时类型和运行时类型,如果编译时类型和运行时类型不一致,就会出现多态. 多态分为: 运行时多态 java运行时系统根据调用该方法的实例的类型来决定选择调用哪个方法则被称 ...

  7. 实现PHPCMS手机门户的伪静态

    1.打开/phpcms/modules/wap/functions/global.func.php找到里面的这两个函数,如下图所示的注释掉的那行代码,在下面加入一行代码. function list_ ...

  8. maven + eclipse + tomcat热部署

    环境:eclipse  + tomcat  + maven + m2eclipse 解决这种问题有两种方案(方案二更好用,不想看方案一的人可以直接绕过). 方案一: 第一种方案摘自http://blo ...

  9. 贪婪 vs 不贪婪

    当重复一个正则表达式时,如用 a*,操作结果是尽可能多地匹配模式.当你试着匹配一对对称的定界符,如 HTML 标志中的尖括号时这个事实经常困扰你.匹配单个 HTML 标志的模式不能正常工作,因为 .* ...

  10. (转抄:人人都是产品经理——iamsujie)如何提高产品规划PPT的能力

    做产品几年之后,不可避免的要碰到写规划这件事儿,虽说不少人,不乏大牛,对规划持“无用论”的观点, 但大多数人其实还是更相信这个段子: 在一个公司里,看一个人的地位,主要看他平时写的文档类型——写wor ...