2014년 12월 28일 일요일

result is value of initialized number

everything is initialized to 1 (i also tried 0)i have two text boxes a button and a label. i need the quotiant of textbox 1 text divided by textbox 2 text to be entered into label (along with other variables,which are not attatched at the moment ) when button is pressed.the problem is the label reports "1" when i test it.




This works:

When rows.Text = 122   and number.Text=16, the quotient is 7, you did not ask for the remainder (0.625).   If you did normal division the answer would be 7.625.


Do you see where you are making the mistake?  You set global dec_times_number_one to 1, so in the instructions label, you will always get a value of 1.


댓글 없음:

댓글 쓰기