皮皮学,免费搜题
登录
搜题
【简答题】
用结构体类型表示一个分数,定义一个函数实现两分数的加法运算,主函数中调用该函数验证其功能。 为了便于我读你的程序,分数的结构体类型统一为: typedef struct { int n; // 分子 int d; // 分母 } FRACTION; 要求: 1、两分数的加法必须编写为一个函数 2、求最大公约数也必须编写为一个函数 3、分母通分时不必求最小公倍数,两分母相乘即可,因为通分反而增加计算量 4、分数如果为负数,统一分子为负数,分母为正数,如-3/5 5、输入的分数不考虑以下不规范或错误的情况,如: 3/-5 -3/-5 3/0 6、输出求和的结果时,应做到 3/1 输出3即可 0/5 输出0即可 7、当然要编main函数验证你的自定义函数。程序中应有必要的注释,标识符取名要做到“见名知意”
拍照语音搜题,微信中搜索"皮皮学"使用
参考答案:
参考解析:
知识点:
.
..
皮皮学刷刷变学霸
举一反三
【单选题】The head of the ruling party and that of the Opposition party in Britain are called respectively.
A.
Prime Minister... Leader
B.
President... Chairman
C.
Prime Minister... Lord
D.
Premier... Leader
【单选题】你喜不喜欢设计中的陶瓷工艺用的多了?
A.
喜欢
B.
一般
C.
不喜欢
【简答题】[A] authority [B] power [C] control [D] ruling
【判断题】二极管的正向电阻比反向电阻大
A.
正确
B.
错误
【单选题】Unfortunately, the aboriginal(土著) people tried in vain to win independence ______ the ruling tribe, and prejudice ______ them still continued. [     ]
A.
of, towards
B.
on, for
C.
from, against
D.
by, over
【单选题】轴线、对称中心线一般采用 。
A.
细实线
B.
虚线
C.
细单点长画线
D.
细双点长画线
【单选题】The ruling determined by the International Court of Justice should be honored by the UN member states.
A.
Y
B.
N
C.
NG
【单选题】The (ruling) party could even lose (its) majority in the lower house of parliament, (started) a period of (prolonged struggling).
A.
ruling
B.
its
C.
started
D.
prolonged struggling
【判断题】一般纳税人进行抄税,先在开票系统里做"上报汇总"----然后网上申报-----再进开票系统里做"远程清卡"
A.
正确
B.
错误
【单选题】轴线、对称中心线一般采用()
A.
细实线
B.
粗实线
C.
细点画线
D.
细双点画线
相关题目: