有人可以用Windows窗体帮我吗?

问题描述:

我想用c#中的windows窗体应用程序创建一个程序,将十进制数转换成一个分数。

帮助我!请!!



我的尝试:



I would like to create a program with the windows form application in c # that will convert a decimal number into a fraction.
Help me! please!!

What I have tried:

I have no idea how to do it

这根本不难:12.3只是12 3 / 10 和12.5只是12 5 / 10



如果你想要它作为一个不可简化的部分,它会变得更加复杂,即12.3只是12 3 / 10 但12.5是12 1 / 2

这是你的作业,所以我不会给你任何代码,但请看这里:不可减少的部分 - 维基百科 [ ^ ] - 它可能会给你一些想法。
It's not difficult at all: 12.3 is just 12 3/10 and 12.5 is just 12 5/10

It's if you want it as a irreducible fraction that it gets more complex, i.e. 12.3 is just 12 3/10 but 12.5 is 12 1/2
This is your homework, so I'll give you no code, but see here: Irreducible fraction - Wikipedia[^] - it may give you some ideas.