如何显示给定数字的幂 [英] How to display a power of a given number
本文介绍了如何显示给定数字的幂的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何以Windows形式在c#中显示给定数字的幂..例如
2²
how can I display the power of a given number in c# in a windows form.. as an example
2²
推荐答案
使用 Math.Pow [ ^ ]方法来计算值(文档页面中有一个示例),然后在TextBox
中显示该值.
Use the Math.Pow[^] method to compute the value (there''s an example in the documentation page) and then show the value in a TextBox
.
如果要查找上标或下标格式,请尝试使用RichTextBox.此链接可能会对您有所帮助.
If you are looking for superscript or subscript kind of format, try RichTextBox instead. This link might help you.
尝试:
2^2
电源符号是键盘上的向上箭头符号(以及数字6)
Power sign is the up-arrow sign on the keyboard (along with number 6)
这篇关于如何显示给定数字的幂的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文