// // penjumlahan list box - Geeks Portal

penjumlahan list box

Last post 11-27-2010 14:02 by richard.tan. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 10-17-2009 14:20

    • mamadou
    • Top 75 Contributor
    • Joined on 11-29-2008
    • Posts 81
    • Points 1,725

    penjumlahan list box

    saya punya listbox yang isi adalah angka dan saya punya 2 textbox yang satu buat masukan angka ke listbox yang satunya buat menjumlah semua angka yang ada di listbox, saya ingin tanyakan bagaimana cara menjumlahkan semua isi listbox tersebut mohon petunjuknya ????

    • Post Points: 35
  • 10-17-2009 15:22 In reply to

    • adi.trim
    • Top 75 Contributor
    • Joined on 10-06-2008
    • Medan
    • Posts 77
    • Points 1,175

    Re: penjumlahan list box

    C# Version : int jlh = 0; foreach(int nil in listbox1.items) { jlh += nil; } //tampilkan jlh sebagai output VB Version: dim jlh as integer = 0 for each x as integer in listbox1.items jlh += x next ////tampilkan jlh sebagai output Rgds Adi
    adi
    email : adi4vista@gmail.com
    Blogs-1 : http://adi4vista.blogspot.com
    Blogs-2 : http://adi4vista.wordpress.com
    • Post Points: 20
  • 10-07-2010 20:00 In reply to

    • adhtie
    • Not Ranked
    • Joined on 02-24-2010
    • Posts 1
    • Points 20

    Re: penjumlahan list box

     kalo coding d C++ gmana?

     makasih sebelumnya...

    • Post Points: 20
  • 10-08-2010 9:14 In reply to

    • adi.trim
    • Top 75 Contributor
    • Joined on 10-06-2008
    • Medan
    • Posts 77
    • Points 1,175

    Re: penjumlahan list box

     gunakan code converter aja untuk mengconvert code tersebut ke dalam c++

    adi
    email : adi4vista@gmail.com
    Blogs-1 : http://adi4vista.blogspot.com
    Blogs-2 : http://adi4vista.wordpress.com
    • Post Points: 5
  • 11-27-2010 14:02 In reply to

    Re: penjumlahan list box

    kalo caranya bapak adi itu udah lumaiian mid level kalo cara basic nya buat nubie Dim sum As Integer = 0 For i As Integer = 0 To LB.Items.Count - 1 sum = sum + LB.Items(i) Next TextBox2.Text = sum *lb= listbox1 Richard, MCP,MCTS
    Regards
    Richard Tan, MCPD
    __________________________________
    we will not go down, in the night without a fight
    • Post Points: 5
Page 1 of 1 (5 items)