Problem G: C语言习题5.24--利用参数宏进行角度与弧度转换

C语言习题:利用参数宏进行角度弧度转换
该博客介绍了C语言习题5.24的内容,要求定义参数宏AngleToRadian用于将度、分、秒转换为弧度。题目提供了时间限制、内存限制以及输入输出示例,并提示学生如何完成代码实现。

Problem G: C语言习题5.24--利用参数宏进行角度与弧度转换

Time Limit: 1 Sec  Memory Limit: 128 MB

 

Description

定义参数宏AngleToRadian(degree,minute,second),将度(degree)、分(minute)、秒(second)转换为弧度。(#define PI 3.14159)

#include <stdio.h>
#define PI 3.14159

/**********/

在此补充缺少的代码

/**********/

int main()
{
    double degree,minute,second;
    scanf("%lf %lf %lf",&degree,&minute,&second);
    printf("%f",AngleToRadian(degree,minute,second)); /*参数宏会被替换为定义的表达式,算出结果后输出*/
    return 0;
}

Input

度,分,秒

Output

转换后的弧度

Sample Input

180 0 0

Sample Output

3.141590

HINT

参考答案:

计算出了一推负数 2108 2024-08-13 20:19:25 2024-08-13 19:37:45 -0.69 2108 2024-08-13 20:19:25 2024-08-13 19:58:23 -0.35 2108 2024-08-13 20:19:25 2024-08-13 20:18:54 -0.01 2108 2024-08-13 20:19:25 2024-09-22 13:41:52 953.37 2108 2024-08-13 20:19:25 2024-09-22 13:41:52 953.37 3309 2024-08-29 17:23:00 2024-08-29 15:57:56 -1.42 3309 2024-08-29 17:23:00 2024-08-29 16:39:06 -0.73 3309 2024-08-29 17:23:00 2024-08-29 17:20:26 -0.04 3309 2024-08-29 17:23:00 2024-09-21 14:28:36 549.09 3309 2024-08-29 17:23:00 2024-09-21 14:28:36 549.09 3519 2024-09-02 14:06:09 2024-09-02 13:13:52 -0.87 3519 2024-09-02 14:06:09 2024-09-02 13:21:32 -0.74 3519 2024-09-02 14:06:09 2024-09-02 14:05:24 -0.01 3519 2024-09-02 14:06:09 2025-10-29 14:27:46 10128.36 6359 2024-10-15 17:29:34 2024-10-14 13:09:06 -28.34 6359 2024-10-15 17:29:34 2024-10-15 09:27:15 -8.04 6359 2024-10-15 17:29:34 2024-10-15 17:28:26 -0.02 7809 2024-11-03 17:06:23 2024-11-03 11:02:32 -6.06 7809 2024-11-03 17:06:23 2024-11-03 11:03:57 -6.04 7809 2024-11-03 17:06:23 2024-11-03 17:05:37 -0.01 8292 2024-11-09 19:16:00 2024-11-08 11:18:50 -31.95 8292 2024-11-09 19:16:00 2024-11-08 11:20:26 -31.93 8292 2024-11-09 19:16:00 2024-11-09 19:15:30 -0.01 8640 2024-11-12 15:23:17 2024-11-12 14:46:17 -0.62 8640 2024-11-12 15:23:17 2024-11-12 14:53:45 -0.49 8640 2024-11-12 15:23:17 2024-11-12 15:22:27 -0.01 8994 2024-11-17 17:22:54 2024-11-17 16:45:23 -0.63 8994 2024-11-17 17:22:54 2024-11-17 16:59:51 -0.38 8994 2024-11-17 17:22:54 2024-11-17 17:20:09 -0.05 8994 2024-11-17 17:22:54 2024-11-17 21:23:02 4.00 8994 2024-11-17 17:22:54 2024-11-17 21:23:02 4.00 9474 2024-11-23 11:35:11 2024-11-23 11:27:52 -0.12 9474 2024-11-23 11:35:11 2024-11-23 11:28:34 -0.11 9474 2024-11-23 11:35:11 2024-11-23 11:34:21 -0.01 9474 2024-11-23 11:35:11 2024-11-23 14:39:42 3.08 9474 2024-11-23 11:35:11 2024-11-23 14:39:42 3.08 9550 2024-11-25 09:28:00 2024-11-25 08:59:51 -0.47 9550 2024-11-25 09:28:00 2024-11-25 09:24:55 -0.05 9550 2024-11-25 09:28:00 2024-11-25 09:27:39 -0.01 9640 2024-11-26 09:36:35 2024-11-26 09:13:07 -0.39 9640 2024-11-26 09:36:35 2024-11-26 09:15:55 -0.34 9640 2024-11-26 09:36:35 2024-11-26 09:35:47 -0.01 9903 2024-11-28 13:36:22 2024-11-28 13:16:43 -0.33 9903 2024-11-28 13:36:22 2024-11-28 13:17:23 -0.32 9903 2024-11-28 13:36:22 2024-11-28 13:35:38 -0.01 10308 2024-12-03 15:44:00 2024-12-03 15:32:13 -0.20 10308 2024-12-03 15:44:00 2024-12-03 15:36:00 -0.13 10308 2024-12-03 15:44:00 2024-12-03 15:43:26 -0.01 10308 2024-12-03 15:44:00 2024-12-30 10:26:46 642.71 10308 2024-12-03 15:44:00 2024-12-30 10:26:46 642.71 10408 2024-12-04 15:13:29 2024-12-04 14:45:56 -0.46 10408 2024-12-04 15:13:29 2024-12-04 14:46:48 -0.44 10408 2024-12-04 15:13:29 2024-12-04 15:12:44 -0.01 10664 2024-12-08 16:52:52 2024-12-08 16:10:40 -0.70 10664 2024-12-08 16:52:52 2024-12-08 16:15:51 -0.62 10664 2024-12-08 16:52:52 2024-12-08 16:52:03 -0.01 10858 2024-12-19 16:00:00 2024-12-10 15:55:47 -216.07 10858 2024-12-19 16:00:00 2024-12-14 09:08:44 -126.85 10858 2024-12-19 16:00:00 2024-12-19 15:44:48 -0.25 10858 2024-12-19 16:00:00 2024-12-19 15:46:42 -0.22 10858 2024-12-19 16:00:00 2025-02-02 14:23:14 1078.39 11399 2024-12-18 14:12:00 2024-12-17 10:10:32 -28.02 11399 2024-12-18 14:12:00 2024-12-18 13:51:39 -0.34 11399 2024-12-18 14:12:00 2024-12-18 13:53:18 -0.31 11399 2024-12-18 14:12:00 2024-12-18 14:08:44 -0.05 11399 2024-12-18 14:12:00 2024-12-18 14:11:58 0.00 11639 2024-12-19 17:38:37 2024-12-19 14:54:14 -2.74 11639 2024-12-19 17:38:37 2024-12-19 15:19:37 -2.32 11639 2024-12-19 17:38:37 2024-12-19 15:21:02 -2.29 11639 2024-12-19 17:38:37 2024-12-19 15:26:48 -2.20 11639 2024-12-19 17:38:37 2024-12-19 17:37:18 -0.02 11890 2024-12-23 14:10:51 2024-12-23 11:01:08 -3.16 11890 2024-12-23 14:10:51 2024-12-23 11:17:57 -2.88 11890 2024-12-23 14:10:51 2024-12-23 11:21:42 -2.82 11890 2024-12-23 14:10:51 2024-12-23 13:00:26 -1.17 11890 2024-12-23 14:10:51 2024-12-23 14:07:15 -0.06 12002 2024-12-24 14:00:00 2024-12-24 09:55:03 -4.08 12002 2024-12-24 14:00:00 2024-12-24 13:02:09 -0.96 12002 2024-12-24 14:00:00 2024-12-24 13:11:13 -0.81 12002 2024-12-24 14:00:00 2024-12-24 13:20:49 -0.65 12002 2024-12-24 14:00:00 2024-12-24 19:14:44 5.25 12144 2024-12-26 10:00:00 2024-12-25 16:44:08 -17.26 12144 2024-12-26 10:00:00 2024-12-25 17:00:56 -16.98 12144 2024-12-26 10:00:00 2024-12-25 17:03:45 -16.94 12144 2024-12-26 10:00:00 2024-12-25 17:10:57 -16.82 12144 2024-12-26 10:00:00 2024-12-25 17:21:22 -16.64 12144 2024-12-26 10:00:00 2024-12-26 10:01:28 0.02 12233 2024-12-26 17:27:22 2024-12-26 16:52:57 -0.57 12233 2024-12-26 17:27:22 2024-12-26 16:59:50 -0.46 12233 2024-12-26 17:27:22 2024-12-26 17:26:33 -0.01 12310 2024-12-30 11:00:00 2024-12-27 13:24:20 -69.59 12310 2024-12-30 11:00:00 2024-12-27 13:29:14 -69.51 12310 2024-12-30 11:00:00 2024-12-30 09:03:44 -1.94 12310 2024-12-30 11:00:00 2024-12-30 10:02:23 -0.96 12310 2024-12-30 11:00:00 2024-12-30 10:15:01 -0.75 12478 2024-12-30 14:00:00 2024-12-30 13:46:52 -0.22 12478 2024-12-30 14:00:00 2024-12-30 13:48:35 -0.19 12478 2024-12-30 14:00:00 2024-12-30 13:50:36 -0.16 12478 2024-12-30 14:00:00 2024-12-30 13:54:12 -0.10 12478 2024-12-30 14:00:00 2024-12-30 16:14:53 2.25 12479 2024-12-30 14:00:00 2024-12-30 13:47:31 -0.21 12479 2024-12-30 14:00:00 2024-12-30 13:48:24 -0.19 12479 2024-12-30 14:00:00 2024-12-30 13:50:30 -0.16 12479 2024-12-30 14:00:00 2024-12-30 13:55:09 -0.08 12479 2024-12-30 14:00:00 2024-12-30 16:15:41 2.26 12546 2024-12-31 16:45:53 2024-12-31 09:21:40 -7.40 12546 2024-12-31 16:45:53 2024-12-31 09:25:17 -7.34 12546 2024-12-31 16:45:53 2024-12-31 10:09:11 -6.61 12546 2024-12-31 16:45:53 2024-12-31 10:29:44 -6.27 12546 2024-12-31 16:45:53 2024-12-31 16:45:03 -0.01 12547 2024-12-31 16:45:21 2024-12-31 09:24:17 -7.35 12547 2024-12-31 16:45:21 2024-12-31 09:25:05 -7.34 12547 2024-12-31 16:45:21 2024-12-31 10:09:18 -6.60 12547 2024-12-31 16:45:21 2024-12-31 10:30:02 -6.26 12547 2024-12-31 16:45:21 2024-12-31 16:44:32 -0.01 12589 2025-01-01 09:00:00 2024-12-31 13:36:06 -19.40 12589 2025-01-01 09:00:00 2024-12-31 13:55:28 -19.08 12589 2025-01-01 09:00:00 2024-12-31 13:55:52 -19.07 12589 2025-01-01 09:00:00 2025-01-01 08:56:59 -0.05 12589 2025-01-01 09:00:00 2025-01-01 14:55:13 5.92 12759 2025-01-03 08:11:00 2025-01-02 16:14:24 -15.94 12759 2025-01-03 08:11:00 2025-01-02 17:40:18 -14.51 12759 2025-01-03 08:11:00 2025-01-02 17:41:33 -14.49 12759 2025-01-03 08:11:00 2025-01-02 17:53:16 -14.30 12759 2025-01-03 08:11:00 2025-01-03 10:31:14 2.34 12760 2025-01-03 13:00:00 2025-01-02 16:16:05 -20.73 12760 2025-01-03 13:00:00 2025-01-02 16:32:50 -20.45 12760 2025-01-03 13:00:00 2025-01-02 16:35:25 -20.41 12760 2025-01-03 13:00:00 2025-01-02 16:38:00 -20.37 12760 2025-01-03 13:00:00 2025-01-04 10:04:03 21.07 12878 2025-01-09 08:00:00 2025-01-03 20:19:47 -131.67 12878 2025-01-09 08:00:00 2025-01-06 14:04:56 -65.92 12878 2025-01-09 08:00:00 2025-01-06 14:14:15 -65.76 12878 2025-01-09 08:00:00 2025-01-06 14:20:32 -65.66 12878 2025-01-09 08:00:00 2025-01-09 13:20:27 5.34 13020 2025-01-06 19:39:00 2025-01-06 13:38:07 -6.01 13020 2025-01-06 19:39:00 2025-01-06 13:48:47 -5.84 13020 2025-01-06 19:39:00 2025-01-06 17:55:22 -1.73 13020 2025-01-06 19:39:00 2025-01-07 09:28:54 13.83 13020 2025-01-06 19:39:00 2025-01-07 15:15:54 19.62 13042 2025-01-07 10:22:00 2025-01-06 17:57:20 -16.41 13042 2025-01-07 10:22:00 2025-01-06 17:59:09 -16.38 13042 2025-01-07 10:22:00 2025-01-06 18:02:22 -16.33 13042 2025-01-07 10:22:00 2025-01-07 09:49:51 -0.54 13042 2025-01-07 10:22:00 2025-01-07 11:23:51 1.03 13224 2025-01-08 15:35:02 2025-01-08 10:20:45 -5.24 13224 2025-01-08 15:35:02 2025-01-08 11:26:21 -4.14 13224 2025-01-08 15:35:02 2025-01-08 13:08:23 -2.44 13224 2025-01-08 15:35:02 2025-01-08 13:10:15 -2.41 13224 2025-01-08 15:35:02 2025-01-08 15:34:14 -0.01 13274 2025-01-09 14:22:52 2025-01-09 08:27:46 -5.92 13274 2025-01-09 14:22:52 2025-01-09 08:34:36 -5.80 13274 2025-01-09 14:22:52 2025-01-09 08:36:21 -5.78 13274 2025-01-09 14:22:52 2025-01-09 09:52:06 -4.51 13274 2025-01-09 14:22:52 2025-01-09 14:23:15 0.01 13295 2025-01-09 10:50:56 2025-01-09 08:57:04 -1.90 13295 2025-01-09 10:50:56 2025-01-09 09:36:29 -1.24 13295 2025-01-09 10:50:56 2025-01-09 09:40:21 -1.18 13295 2025-01-09 10:50:56 2025-01-09 09:52:27 -0.97 13295 2025-01-09 10:50:56 2025-01-09 10:51:05 0.00 13312 2025-01-09 13:18:44 2025-01-09 09:20:44 -3.97 13312 2025-01-09 13:18:44 2025-01-09 09:21:42 -3.95 13312 2025-01-09 13:18:44 2025-01-09 09:23:05 -3.93 13312 2025-01-09 13:18:44 2025-01-09 09:53:56 -3.41 13312 2025-01-09 13:18:44 2025-01-09 13:18:58 0.00 13319 2025-01-09 11:00:00 2025-01-09 09:33:42 -1.44 13319 2025-01-09 11:00:00 2025-01-09 09:36:45 -1.39 13319 2025-01-09 11:00:00 2025-01-09 10:47:27 -0.21 13319 2025-01-09 11:00:00 2025-01-09 19:41:16 8.69 13336 2025-01-11 09:43:37 2025-01-09 10:25:55 -47.30 13336 2025-01-11 09:43:37 2025-01-09 10:29:41 -47.23 13336 2025-01-11 09:43:37 2025-01-09 10:29:50 -47.23 13336 2025-01-11 09:43:37 2025-01-09 15:17:04 -42.44 13336 2025-01-11 09:43:37 2025-01-09 16:50:52 -40.88 13336 2025-01-11 09:43:37 2025-01-11 09:43:55 0.01 13397 2025-01-12 14:00:00 2025-01-10 08:56:04 -53.07 13397 2025-01-12 14:00:00 2025-01-10 10:41:29 -51.31 13397 2025-01-12 14:00:00 2025-01-10 13:06:13 -48.90 13397 2025-01-12 14:00:00 2025-01-10 13:09:09 -48.85 13397 2025-01-12 14:00:00 2025-01-13 15:11:44 25.20 13398 2025-01-10 12:57:49 2025-01-10 08:56:29 -4.02 13398 2025-01-10 12:57:49 2025-01-10 09:32:54 -3.42 13398 2025-01-10 12:57:49 2025-01-10 09:33:26 -3.41 13398 2025-01-10 12:57:49 2025-01-10 10:20:10 -2.63 13398 2025-01-10 12:57:49 2025-01-10 12:58:02 0.00 13416 2025-01-10 13:19:03 2025-01-10 09:38:38 -3.67 13416 2025-01-10 13:19:03 2025-01-10 09:40:17 -3.65 13416 2025-01-10 13:19:03 2025-01-10 09:42:10 -3.61 13416 2025-01-10 13:19:03 2025-01-10 10:19:41 -2.99 13416 2025-01-10 13:19:03 2025-01-10 13:19:31 0.01 13447 2025-01-10 16:42:01 2025-01-10 14:44:40 -1.96 13447 2025-01-10 16:42:01 2025-01-10 14:45:12 -1.95 13447 2025-01-10 16:42:01 2025-01-10 14:49:33 -1.87 13447 2025-01-10 16:42:01 2025-01-10 14:50:39 -1.86 13447 2025-01-10 16:42:01 2025-01-10 16:42:07 0.00 13454 2025-01-11 18:47:00 2025-01-10 16:26:06 -26.35 13454 2025-01-11 18:47:00 2025-01-10 16:57:15 -25.83 13454 2025-01-11 18:47:00 2025-01-10 17:05:28 -25.69 13454 2025-01-11 18:47:00 2025-01-10 17:12:17 -25.58 13454 2025-01-11 18:47:00 2025-01-11 19:09:42 0.38
最新发布
11-12
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值