输入text里,inputcount(总数),wrongcount(不正确的数),label1显示正确的数
 label1.caption=(inputcount-wrongcount)/2
现在问题是:
 因为现在是每个输入两次,如何使label1始终显示的始终是整数,简单一点就是每正确输入两次在记录时label里只显示一次???

解决方案 »

  1.   

    label1.caption=int((inputcount-wrongcount)/2)
      

  2.   

    label1.caption=CInt((inputcount-wrongcount)/2)
      

  3.   

    label1.caption=CInt((inputcount-wrongcount)/2)
      

  4.   

    初步可以实现要求,但有需要完善
     1.如何不显示0,直接显示1,因为当inputcount=1,wrongcount=0时,label1.caption=0
     即要求,每1,3,5,7,9......
    对应显示label1.caption=1,2,3,4,5???
     而上面的代码的节奏是不定的!
      

  5.   

    label1.caption=CInt((inputcount-wrongcount+1)/2)
      

  6.   

    好象不是按1,3,5,7,9对应label.caption=1,2,3,4,5!!