Problem Z: 零起点学算法22——求正弦和余弦
#include<stdio.h>
#include <math.h>
int main()
{
int n;
const double pi=acos(-);
double a,b;
while(scanf("%d",&n)!=EOF)
a=sin(n*pi/);
b=cos(n*pi/);
printf("%.2f\n%.2f\n",a,b);
return ;
}
Problem Z: 零起点学算法22——求正弦和余弦的更多相关文章
- Problem X: 零起点学算法22——华氏摄氏温度转换
#include<stdio.h> int main() { float f,c; while(scanf("%f",&f)!=EOF) c=*(f-); pr ...
- Problem W: 零起点学算法21——求平均值
#include<stdio.h> int main() { int a,b,c; scanf("%d %d %d",&a,&b,&c); pr ...
- Problem R: 零起点学算法13——求2个时间之间的分钟数
#include<stdio.h> int main() { int a1,b1,a2,b2,s; scanf("%d:%d",&a1,&b1); sc ...
- Problem Q: 零起点学算法12——求2个日期之间的天数
#include<stdio.h> int main() { int a1,b1,c1,a2,b2,c2,s; scanf("%d-%d-%d",&a1,&am ...
- Problem O: 零起点学算法10——求圆柱体的表面积
#include<stdio.h> int main() { float r,h,pi; pi=3.1415926; scanf("%f %f",&r,& ...
- 武汉科技大学ACM :1010: 零起点学算法12——求2个日期之间的天数
Problem Description 水题 Input 输入2个日期,日期按照年月日,年月日之间用符号-隔开(题目包含多组数据) Output 求出这2个日期之间的天数(不包括自身),每组测试数据一 ...
- 武汉科技大学ACM :1006: 零起点学算法25——求两点之间的距离
Problem Description 输入平面坐标系中2点的坐标,输出它们之间的距离 Input 输入4个浮点数x1 y1 x2 y2,分别是点(x1,y1) (x2,y2)的坐标(多组数据) Ou ...
- 武汉科技大学ACM :1002: 零起点学算法38——求阶乘和
Problem Description 输入一个正整数n(n<=10),计算 S=1!+2!+3!+...+n! Input 输入一个正整数n(n<=10)(多组数据) Output 输出 ...
- Problem G: 零起点学算法106——首字母变大写
#include<stdio.h> #include<string.h> int main(void) { ]; int i,k; while(gets(a)!=NULL) { ...
随机推荐
- javascript继承有5种实现方式
1.对象冒充 function Parent(username){ this.username = username; this.hello = function(){ alert(this.user ...
- Jquery Ajax异步上传
<script> $(function(){ $('#filephoto').change(function(imgFile){ console.log(imgFile) var file ...
- TCP(一)
TCP的特点:三次握手.四次挥手.可靠连接.丢包重传.所有的关键词都围绕着可靠传输. 实现可靠传输的核心机制:seq+ack.通过ack判断是否有丢包,是否需要重传. 三次握手 1)初始状态:clie ...
- 将setter方法与itemClick: 进行类比
https://www.evernote.com/shard/s227/sh/a0c3afa3-8792-4756-8594-d2387a7f57ad/b561ff665af9ad401c8e ...
- bzoj1257 数学整理二分查询
2013-11-15 21:55 原题传送门http://www.lydsy.com/JudgeOnline/problem.php?id=1257 要求求sigma k mod i(i<=n) ...
- eclipse使用git下载项目
准备工作: 目的:从远程仓库github上down所需的项目 eclipse使用Git插件下载github上项目 eclipse版本:eclipse4.5 64位 jdk版本:jdk-1.7 64位 ...
- [Leetcode Week3]Clone Graph
Clone Graph题解 原创文章,拒绝转载 题目来源:https://leetcode.com/problems/clone-graph/description/ Description Clon ...
- Linux内核同步机制之(四):spin lock【转】
转自:http://www.wowotech.net/kernel_synchronization/spinlock.html 一.前言 在linux kernel的实现中,经常会遇到这样的场景:共享 ...
- PL/SQL 06 函数 function
--函数 create or replace function 函数名称(参数1 类型1,参数2 类型2,...) return 数据类型as 变量.常量声明;begin 代码;end; cr ...
- [ Mariadb ] 通过HAProxy代理后端Mariadb实现负载均衡
一.本次环境架构图 由于公司内网服务器有限,所以后端采用Mariadb自带的mysql_multi模型实现多实例. mysql的多实例有两种方式可以实现,两种方式各有利弊. 1.使用多个配置文件启动不 ...