C++练习题9
本帖最后由 as12350992 于 2020-11-29 23:44 编辑Activity 14
Fraction Sum
Create a struct to hold a fraction. The struct should have an integer numerator and an integer denominator member. Declare 2 fraction variables and read them in from the user. Write a function called multiply that takes both fractions, multiplies them together, and prints the result out as a decimal number. You do not need to reduce the fraction to its lowest terms.
活动14
小数总和
创建一个保存分数的结构。该结构应具有整数分子和整数分母成员。声明2个分数变量,并从用户中读取它们。编写一个名为乘法的函数,该函数将两个分数相乘,并将它们相乘,然后将结果打印为十进制数。您无需将分数降低到最低限度。 可以把他们汇总到一个帖子发,这样把其他帖子都弄沉了 好的,下次注意
页:
[1]