VB语言:找出所有三位数,满足其个位,十位,百位三个数字之和为10

1个回答

  • private sub form_load()

    dim i,a,b,c as integer

    for i=100 to 999

    a=i100

    b=(i-a*100)10

    c=i-a*100-b*10

    if a+b+c=10 then print i,

    next

    end su