1101 -- 正弦和余弦

来源:互联网 发布:淘宝男模特招聘条件 编辑:程序博客网 时间:2024/06/04 17:44

正弦和余弦

Time Limit:1000MS  Memory Limit:65536K
Total Submit:521 Accepted:207

Description

输入一个正整数n(n不超过360)输出n度的正弦余弦函数值(保留三位小数)

Input

输入一个正整数n

Output

输出n度的正弦余弦函数值(保留三位小数)

Sample Input

30

Sample Output

0.500 0.866

Hint

提示使用数学函数#include

Source

lrj程序入门

    using System;    using System.Collections.Generic;    using System.Linq;    using System.Text;    namespace AK1101 {        class Program {            static void Main(string[] args) {                int x = int.Parse(Console.ReadLine());                double PI = Math.Atan(1.0) * 4.0;                double s = Math.Sin(x * PI / 180);                double b = Math.Cos(x * PI / 180);                Console.WriteLine(s.ToString("0.000") + " " + b.ToString("0.000"));            }        }    }


0 0
原创粉丝点击