告诉我问题的代码 [英] Tell me the code of the question

查看:87
本文介绍了告诉我问题的代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

。取3个文本框,一个用于输入数字,第二个用于设置格式(此文本框仅取0(零)。第三个用于显示数字和按钮显示。

输入数字第一个文本框,在第二个文本框中设置格式,然后按显示按钮。

例如假设您在第一个文本框中输入34,并在文本框中输入格式00000.

单击显示按钮后输出应该像00034



删除了SHOUTING - OriginalGriff [/ edit]

.Take 3 Textboxes, One for entering number, Second for setting format (this text box should take 0 (Zeros) only. And third for showing number and button as Show.
Enter Number in the First text box, Set format in the second textbox, and press Show button.
Ex. Suppose you are giving 34 in the first textbox, and entering format in textbox, 00000.
After clicking Show Button the output should like 00034

[edit]SHOUTING removed - OriginalGriff[/edit]

推荐答案

我们不做你的作业:这是有原因的。它是在那里让你考虑你被告知的东西,并试着理解它。它也在那里,以便你的导师可以识别你身体虚弱的地方,更注重补救行动。



亲自试试,你可能会发现它并不像你想象的那么难!
We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.

Try it yourself, you may find it is not as difficult as you think!


int t1 = txt1.Text.Length;
        int t2 = txt2.Text.Length;
        string t3 = "";
        for (int i = 0; i < t2 - t1; i++)
        {
            t3 += "0";
        }
        txt3.Text = t3 + txt1.Text;





接受解决方案并投票如果解决你的问题。



Accept solution and vote if it is solve your problem.


这篇关于告诉我问题的代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆