📄 chop(1).c
字号:
#include <stdio.h>void chop(double d, long *whole, double *fraction);int main(){ double num = 0.0; long a = 0; double b = 0.0; printf("Please type in a real number: "); scanf("%lf", &num); chop(num, &a, &b); printf("%lf is made up of %ld and %.5lg\n", num, a, b); return 0;}void chop(double d, long *whole, double *fraction){ *whole = long(d); *fraction = d - *whole;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -