SlideShare ist ein Scribd-Unternehmen logo
1 von 20
MAKALAH PEMROGRAMAN KOMPUTER 1


Disusun untuk memenuhi tugas Ujian Tengah Semester
        Mata Kuliah Pemrogaman Komputer 1


                Dosen Pengampu:
               Wildan Suharso. S.Si




                      Oleh :

          Muhammad Sukron       10610067




         JURUSAN MATEMATIKA
     FAKULTAS SAINS DAN TEKNOLOGI
UNIVERSITAS ISLAM NEGERI MAULANA MALIK
            IBRAHIM MALANG
                  2012
BAB I

                          FLOWCHART

1.1 Irisan, Gabungan dan Komplemen



                              Start




       dipilih() as char
       nilai, nilai2 as integer
       f, g,h as string
       A()as string = a.Split(pecah)
       B()as string = b.Split(pecah)
       S()as string = s.Split(pecah)


               f = TextBox1.Text
               g = TextBox2.Text
               h = TextBox3.Text



                 For i = 0 To Ubound(A)




                    For j = 0 To       Ubound(B)




                           If A (i)= B (j)




 B                                 A               C
B                  A              C



          ListBox1.Items.Add(A (i))




         for i=0 to Ubound (A)




          ListBox2.Items.Add(A(i))




        for j = 0 to Ubound (B)




        for k = 0 to Ubound (A)




                If B(j) < > A(k)




E                      D              F
E                D                   F


          nilai = nilai + 1




       If nilai > A.Length - 1




     ListBox2.Items.Add(B(j))




              nilai = 0



    for i = 0 to Ubound (S)




    for j = 0 to Ubound (A)




I                H               J
I              H               J


    If S(i) <> A(j)




         Nilai2 += 1




        If x > A.Length -
    1




    ListBox3.Items.Add(S(i))




            Nilai2 = 0




               Stop
1.2 Selection Sort irisan A dan B




                                        Start




                    i, r , q, m, n As Integer
                    r = ListBox1.Items.Count - 1
                    selec_irisan(r) As Integer


                                  For i = 0 To r



                    Selec_irisan(i) = ListBox1.Items(i)



                               For i = 0 To
                               selec_irisan. length
                               1

                                        m = i


                           For q = i + 1 To
                           selec_irisan.Length- 1



M                                         K               N
M                      K                N




             If selec_ irisan (q) <
             selec_irisan(m)




                     m=q



                     If m <> i



    n = selec_irisan (i)
    selec_irisan(i) = selec_irisan(m)
    selec_irisan(m) = n


           For p = 0 To
           selec_irisan.Length - 1




         TextBox4.AppendText(CStr(se
         lec_irisan(p)) & " ")




                      Stop
1.3 Selection Sort Gabungan A dan B


                                     Start




                     min, temp, y As Integer
                     y = ListBox2.Items.Count - 1
                     gabunganAB(x) As Integer


                                  For i = 0 To y



                     Selec_gabungan (i) = ListBox2.Items(i)



                              For i = 0 To
                              Selc_gabungn.Length-1



                                      min = i


                           For j = i + 1 To
                           Selec_gabungan.Length - 1



P                                      O                      Q
P                    O                       Q




            If Selec_gabungan (j)
            < Selec_gabungan
            (min)


                   min = j



                  If min <> i



    temp = Selec_gabungan (i)
    Selec_gabungan (i) = Selec_gabungan(m)
    Selec_gabungan (min) = temp


          For p= 0 To
          Selec_gabungan.Length
          -1


        TextBox4.AppendText(CStr(ga
        Selec_gabungan (p)) & " ")




                    Stop
1.4 Selection Sort komplemen A terhadap S




                                    Start




                    km, kp, z As Integer
                    z = ListBox3.Items.Count - 1
                    selec_komplemn(z) As Integer


                                 For i = 0 To z



                    selec_komplemn (i) = ListBox3.Items(i)



                             For i = 0 To
                             selc_komplmn.Length-1



                                     km = i


                          For j = i + 1 To
                          selec_komplemn.Length - 1



 S                                    R                      T
P                    O                      Q




            If selec_komplemn (j)
            < selc_komplmn (km)




                   km = j



                  If km < > i



    kp = selec_komplemn (i)
    selec_komplmn (i) = selc_komplmn (km)
    selec_komplemn (km) = kp


          For p= 0 To
          selec_komplemn.Length
          -1


        TextBox4.AppendText(CStr(k
        selec_komplemn (p)) & " ")




                    Stop
BAB II

                            PESEUDOCODE



2.1 Irisan

  For i = 0 to Ubound[A] {

      For j = 0 to Ubound[B]

           If A[i]=B[j]

       }

  }

2.2 Gabungan

For i = 0 to Ubound[B] {

   For j = 0 to Ubound[A]

           If B[i]< >A[j]

               Nilai = nilai + 1

           If nilai > A.length – 1

               Nilai = 0

       }

  }



2.3 Komplemen

For i = 0 to Ubound[S] {
For j = 0 to Ubound[A]

           If S[i]< >A[j]

               Nilai2 + = 1

           If nilai2 > A.length – 1

               Nilai2 = 0

       }

   }



2.4 Selection Irisan

   For i = 0 to selec_irisan.length – 1{

           m=i

           for q = i + 1 to selec_irisan.length – 1

               if selec_irisan [q] < selec_irisan [m]

                    m=0

               if m < > i

                    n= selec_irisan [i]

                    selec_irisan [i] = selec_irisan [m]

                    selec_irisan [m] = n

       }

   }
2.5 Selection Gabungan

   For i = 0 to selec_gabungan.length – 1{

           min = i

           for j = i + 1 to selec_gabunga.length – 1

               if selec_gabungan [j] < selec_gabungan [min]

                     min = j

               if min < > i

                     temp = selec_gabungan [i]

                     selec_ gabungan [i] = selec_gabungan [min]

                     selec_ gabungan [min] = temp

       }

   }




2.6 Selection Komplemen

   For i = 0 to selec_komplemen.length – 1{

           km = i

           for j = i + 1 to selec_komplemen.length – 1

               if selec_komplemen [j] < selec_komplemen [km]

                     km = j
if km < > i

            kp = selec_komplemen [i]

            selec_komplemen [i] = selec_komplemen [km]

            selec_komplemen [km] = kp

    }

}
BAB III

TAMPILAN APLIKASI
BAB IV

                        SOURCE
Public Class Form1

    Private Sub Button1_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
Button1.Click
        Dim dipilih() As Char = {".", ",", "*", " "}
        Dim f, g, h As String
        Dim nilai, nilai2 As Integer
        nilai = 0
        nilai2 = 0
        f = TextBox1.Text
        g = TextBox2.Text
        h = TextBox3.Text

       Dim A() As String = f.Split(dipilih)
       Dim B() As String = g.Split(dipilih)
       Dim S() As String = h.Split(dipilih)

       'irisan
       For i = 0 To UBound(A)
            For j = 0 To UBound(B)
                If A(i) = B(j) Then
                    ListBox1.Items.Add(A(i))
                End If
            Next
       Next

       'gabungan
       For i = 0 To UBound(A)
            ListBox2.Items.Add(A(i))
       Next

       For i = 0 To UBound(B)
            For j = 0 To UBound(A)
                If B(i) <> A(j) Then
                    nilai = nilai + 1
                End If
            Next
            If nilai > A.Length - 1 Then
                ListBox2.Items.Add(B(i))
            End If
            nilai = 0
       Next
       'komplemen
For i = 0 To UBound(S)
             For j = 0 To UBound(A)
                 If S(i) <> A(j) Then
                     nilai2 += 1
                 End If
             Next
             If nilai2 > A.Length - 1 Then
                 ListBox3.Items.Add(S(i))
             End If
             nilai2 = 0
        Next

    End Sub


    Private Sub Label13_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
Label13.Click
        Refresh()
        TextBox1.Text = ""
        TextBox2.Text = ""
        TextBox3.Text = ""
        TextBox4.Text = ""
        TextBox5.Text = ""
        TextBox6.Text = ""
        ListBox1.Text = ""
        ListBox2.Text = ""
        ListBox3.Text = ""
    End Sub

    Private Sub Label15_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
Label15.Click
        MsgBox("muhammad sukron" + vbCrLf + "10610067")
    End Sub

    Private Sub Button2_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
Button2.Click
        'sort irirsan
        Dim i, r, q, m, n As Integer
        r = ListBox1.Items.Count - 1
        Dim selec_irisan(r) As Integer
        For i = 0 To r
             selec_irisan(i) = ListBox1.Items(i)
        Next
        For i = 0 To selec_irisan.Length - 1
             m = i
             For q = i + 1 To selec_irisan.Length - 1
If selec_irisan(q) < selec_irisan(m) Then
                       m = q
                   End If
               Next
               If m <> i Then
                   n = selec_irisan(i)
                   selec_irisan(i) = selec_irisan(m)
                   selec_irisan(m) = n
               End If
        Next

        For p = 0 To selec_irisan.Length - 1
            TextBox4.AppendText(" " +
CStr(selec_irisan(p)))

        Next
        'sort gabungan
        Dim min, temp, y As Integer
        y = ListBox2.Items.Count - 1
        Dim selec_gabungan(y) As Integer
        For i = 0 To y
             selec_gabungan(i) = ListBox2.Items(i)
        Next
        For i = 0 To selec_gabungan.Length - 1
             min = i
             For j = i + 1 To selec_gabungan.Length - 1
                 If selec_gabungan(j) <
selec_gabungan(min) Then
                     min = j
                 End If
             Next
             If min <> i Then
                 temp = selec_gabungan(i)
                 selec_gabungan(i) = selec_gabungan(min)
                 selec_gabungan(min) = temp
             End If
        Next
        For p = 0 To selec_gabungan.Length - 1
             TextBox5.AppendText(" " +
CStr(selec_gabungan(p)))
        Next



        'sort komplemen

        Dim km, kp, z As Integer
        z = ListBox3.Items.Count - 1
        Dim selec_komplemen(z) As Integer
For i = 0 To z
             selec_komplemen(i) = ListBox3.Items(i)
        Next
        For i = 0 To selec_komplemen.Length - 1
             km = i
             For j = i + 1 To selec_komplemen.Length - 1
                 If selec_komplemen(j) <
selec_komplemen(km) Then
                     km = j
                 End If
             Next

               If km <> i Then
                   kp = selec_komplemen(i)
                   selec_komplemen(i) = selec_komplemen(km)
                   selec_komplemen(km) = kp
               End If
        Next

        For p = 0 To selec_komplemen.Length - 1
             TextBox6.AppendText(" " +
CStr(selec_komplemen(p)))
        Next
    End Sub
End Class

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (18)

Ols
OlsOls
Ols
 
On best one sided approximation by multivariate lagrange
      On best one sided approximation by multivariate lagrange      On best one sided approximation by multivariate lagrange
On best one sided approximation by multivariate lagrange
 
Applications of Homotopy perturbation Method and Sumudu Transform for Solving...
Applications of Homotopy perturbation Method and Sumudu Transform for Solving...Applications of Homotopy perturbation Method and Sumudu Transform for Solving...
Applications of Homotopy perturbation Method and Sumudu Transform for Solving...
 
2017-12, Keio University, Projection-based Regularized Dual Averaging for Sto...
2017-12, Keio University, Projection-based Regularized Dual Averaging for Sto...2017-12, Keio University, Projection-based Regularized Dual Averaging for Sto...
2017-12, Keio University, Projection-based Regularized Dual Averaging for Sto...
 
PMED Transition Workshop - A Bayesian Model for Joint Longitudinal and Surviv...
PMED Transition Workshop - A Bayesian Model for Joint Longitudinal and Surviv...PMED Transition Workshop - A Bayesian Model for Joint Longitudinal and Surviv...
PMED Transition Workshop - A Bayesian Model for Joint Longitudinal and Surviv...
 
International journal of engineering and mathematical modelling vol2 no3_2015_2
International journal of engineering and mathematical modelling vol2 no3_2015_2International journal of engineering and mathematical modelling vol2 no3_2015_2
International journal of engineering and mathematical modelling vol2 no3_2015_2
 
2017-03, ICASSP, Projection-based Dual Averaging for Stochastic Sparse Optimi...
2017-03, ICASSP, Projection-based Dual Averaging for Stochastic Sparse Optimi...2017-03, ICASSP, Projection-based Dual Averaging for Stochastic Sparse Optimi...
2017-03, ICASSP, Projection-based Dual Averaging for Stochastic Sparse Optimi...
 
Paper Introduction: Combinatorial Model and Bounds for Target Set Selection
Paper Introduction: Combinatorial Model and Bounds for Target Set SelectionPaper Introduction: Combinatorial Model and Bounds for Target Set Selection
Paper Introduction: Combinatorial Model and Bounds for Target Set Selection
 
2017-07, Research Seminar at Keio University, Metric Perspective of Stochasti...
2017-07, Research Seminar at Keio University, Metric Perspective of Stochasti...2017-07, Research Seminar at Keio University, Metric Perspective of Stochasti...
2017-07, Research Seminar at Keio University, Metric Perspective of Stochasti...
 
Some New Operations on Fuzzy Soft Sets
Some New Operations on Fuzzy Soft SetsSome New Operations on Fuzzy Soft Sets
Some New Operations on Fuzzy Soft Sets
 
Fixed point result in probabilistic metric space
Fixed point result in probabilistic metric spaceFixed point result in probabilistic metric space
Fixed point result in probabilistic metric space
 
Errors in the Discretized Solution of a Differential Equation
Errors in the Discretized Solution of a Differential EquationErrors in the Discretized Solution of a Differential Equation
Errors in the Discretized Solution of a Differential Equation
 
A semi analytic method for solving two-dimensional fractional dispersion equa...
A semi analytic method for solving two-dimensional fractional dispersion equa...A semi analytic method for solving two-dimensional fractional dispersion equa...
A semi analytic method for solving two-dimensional fractional dispersion equa...
 
EXACT SOLUTIONS OF A FAMILY OF HIGHER-DIMENSIONAL SPACE-TIME FRACTIONAL KDV-T...
EXACT SOLUTIONS OF A FAMILY OF HIGHER-DIMENSIONAL SPACE-TIME FRACTIONAL KDV-T...EXACT SOLUTIONS OF A FAMILY OF HIGHER-DIMENSIONAL SPACE-TIME FRACTIONAL KDV-T...
EXACT SOLUTIONS OF A FAMILY OF HIGHER-DIMENSIONAL SPACE-TIME FRACTIONAL KDV-T...
 
A COMPARISON OF PARTICLE SWARM OPTIMIZATION AND DIFFERENTIAL EVOLUTION
A COMPARISON OF PARTICLE SWARM OPTIMIZATION AND DIFFERENTIAL EVOLUTIONA COMPARISON OF PARTICLE SWARM OPTIMIZATION AND DIFFERENTIAL EVOLUTION
A COMPARISON OF PARTICLE SWARM OPTIMIZATION AND DIFFERENTIAL EVOLUTION
 
On the Application of a Classical Fixed Point Method in the Optimization of a...
On the Application of a Classical Fixed Point Method in the Optimization of a...On the Application of a Classical Fixed Point Method in the Optimization of a...
On the Application of a Classical Fixed Point Method in the Optimization of a...
 
A new approach to constants of the motion and the helmholtz conditions
A new approach to constants of the motion and the helmholtz conditionsA new approach to constants of the motion and the helmholtz conditions
A new approach to constants of the motion and the helmholtz conditions
 
Wasserstein GAN
Wasserstein GANWasserstein GAN
Wasserstein GAN
 

Ähnlich wie Makalah pk

Poggi analytics - distance - 1a
Poggi   analytics - distance - 1aPoggi   analytics - distance - 1a
Poggi analytics - distance - 1a
Gaston Liberman
 
19. algorithms and-complexity
19. algorithms and-complexity19. algorithms and-complexity
19. algorithms and-complexity
showkat27
 
Ch3(1).pptxbbbbbbbbbbbbbbbbbbbhhhhhhhhhh
Ch3(1).pptxbbbbbbbbbbbbbbbbbbbhhhhhhhhhhCh3(1).pptxbbbbbbbbbbbbbbbbbbbhhhhhhhhhh
Ch3(1).pptxbbbbbbbbbbbbbbbbbbbhhhhhhhhhh
danielgetachew0922
 

Ähnlich wie Makalah pk (20)

Chap09alg
Chap09algChap09alg
Chap09alg
 
Chap09alg
Chap09algChap09alg
Chap09alg
 
1D Array
1D Array1D Array
1D Array
 
chap09alg.ppt for string matching algorithm
chap09alg.ppt for string matching algorithmchap09alg.ppt for string matching algorithm
chap09alg.ppt for string matching algorithm
 
Poggi analytics - distance - 1a
Poggi   analytics - distance - 1aPoggi   analytics - distance - 1a
Poggi analytics - distance - 1a
 
Dynamic programming - fundamentals review
Dynamic programming - fundamentals reviewDynamic programming - fundamentals review
Dynamic programming - fundamentals review
 
U0 vqmtq3mja=
U0 vqmtq3mja=U0 vqmtq3mja=
U0 vqmtq3mja=
 
Imc2017 day2-solutions
Imc2017 day2-solutionsImc2017 day2-solutions
Imc2017 day2-solutions
 
Randomized algorithms ver 1.0
Randomized algorithms ver 1.0Randomized algorithms ver 1.0
Randomized algorithms ver 1.0
 
List comprehensions
List comprehensionsList comprehensions
List comprehensions
 
Fixed Point Theorem in Fuzzy Metric Space Using (CLRg) Property
Fixed Point Theorem in Fuzzy Metric Space Using (CLRg) PropertyFixed Point Theorem in Fuzzy Metric Space Using (CLRg) Property
Fixed Point Theorem in Fuzzy Metric Space Using (CLRg) Property
 
Array
ArrayArray
Array
 
19. algorithms and-complexity
19. algorithms and-complexity19. algorithms and-complexity
19. algorithms and-complexity
 
Ch3(1).pptxbbbbbbbbbbbbbbbbbbbhhhhhhhhhh
Ch3(1).pptxbbbbbbbbbbbbbbbbbbbhhhhhhhhhhCh3(1).pptxbbbbbbbbbbbbbbbbbbbhhhhhhhhhh
Ch3(1).pptxbbbbbbbbbbbbbbbbbbbhhhhhhhhhh
 
Kotlin for Android Developers - 2
Kotlin for Android Developers - 2Kotlin for Android Developers - 2
Kotlin for Android Developers - 2
 
Closeszdfgjklfghjt.string
Closeszdfgjklfghjt.stringCloseszdfgjklfghjt.string
Closeszdfgjklfghjt.string
 
Array
ArrayArray
Array
 
String searching
String searching String searching
String searching
 
ch3.ppt
ch3.pptch3.ppt
ch3.ppt
 
Lec2 slides
Lec2 slidesLec2 slides
Lec2 slides
 

Kürzlich hochgeladen

Deira Call girl agency 0567006274 Call girls in Deira
Deira Call girl agency 0567006274 Call girls in DeiraDeira Call girl agency 0567006274 Call girls in Deira
Deira Call girl agency 0567006274 Call girls in Deira
Monica Sydney
 
Dubai Call girls Service 0524076003 Call girls in Dubai
Dubai Call girls Service 0524076003 Call girls in DubaiDubai Call girls Service 0524076003 Call girls in Dubai
Dubai Call girls Service 0524076003 Call girls in Dubai
Monica Sydney
 
Haridwar Call Girls, 8699214473 Hot Girls Service Haridwar
Haridwar Call Girls, 8699214473 Hot Girls Service HaridwarHaridwar Call Girls, 8699214473 Hot Girls Service Haridwar
Haridwar Call Girls, 8699214473 Hot Girls Service Haridwar
ranekokila
 

Kürzlich hochgeladen (20)

Call Girls Rajnandgaon / 9332606886 Genuine Call girls with real Photos and N...
Call Girls Rajnandgaon / 9332606886 Genuine Call girls with real Photos and N...Call Girls Rajnandgaon / 9332606886 Genuine Call girls with real Photos and N...
Call Girls Rajnandgaon / 9332606886 Genuine Call girls with real Photos and N...
 
Turbhe Female Escorts 09167354423 Turbhe Escorts,Call Girls In Turbhe
Turbhe Female Escorts 09167354423  Turbhe Escorts,Call Girls In TurbheTurbhe Female Escorts 09167354423  Turbhe Escorts,Call Girls In Turbhe
Turbhe Female Escorts 09167354423 Turbhe Escorts,Call Girls In Turbhe
 
Hire 💕 8617370543 Auraiya Call Girls Service Call Girls Agency
Hire 💕 8617370543 Auraiya Call Girls Service Call Girls AgencyHire 💕 8617370543 Auraiya Call Girls Service Call Girls Agency
Hire 💕 8617370543 Auraiya Call Girls Service Call Girls Agency
 
Deira Call girl agency 0567006274 Call girls in Deira
Deira Call girl agency 0567006274 Call girls in DeiraDeira Call girl agency 0567006274 Call girls in Deira
Deira Call girl agency 0567006274 Call girls in Deira
 
Hire 💕 8617370543 Mirzapur Call Girls Service Call Girls Agency
Hire 💕 8617370543 Mirzapur Call Girls Service Call Girls AgencyHire 💕 8617370543 Mirzapur Call Girls Service Call Girls Agency
Hire 💕 8617370543 Mirzapur Call Girls Service Call Girls Agency
 
Bhubaneswar🌹Call Girls Chandrashekharpur ❤Komal 9777949614 💟 Full Trusted CAL...
Bhubaneswar🌹Call Girls Chandrashekharpur ❤Komal 9777949614 💟 Full Trusted CAL...Bhubaneswar🌹Call Girls Chandrashekharpur ❤Komal 9777949614 💟 Full Trusted CAL...
Bhubaneswar🌹Call Girls Chandrashekharpur ❤Komal 9777949614 💟 Full Trusted CAL...
 
Banda call girls 📞 8617370543At Low Cost Cash Payment Booking
Banda call girls 📞 8617370543At Low Cost Cash Payment BookingBanda call girls 📞 8617370543At Low Cost Cash Payment Booking
Banda call girls 📞 8617370543At Low Cost Cash Payment Booking
 
Satara call girl 8617370543♥️ call girls in satara escort service
Satara call girl 8617370543♥️ call girls in satara escort serviceSatara call girl 8617370543♥️ call girls in satara escort service
Satara call girl 8617370543♥️ call girls in satara escort service
 
Dubai Call girls Service 0524076003 Call girls in Dubai
Dubai Call girls Service 0524076003 Call girls in DubaiDubai Call girls Service 0524076003 Call girls in Dubai
Dubai Call girls Service 0524076003 Call girls in Dubai
 
Hire 💕 8617370543 Dhalai Call Girls Service Call Girls Agency
Hire 💕 8617370543 Dhalai Call Girls Service Call Girls AgencyHire 💕 8617370543 Dhalai Call Girls Service Call Girls Agency
Hire 💕 8617370543 Dhalai Call Girls Service Call Girls Agency
 
Call Girls In Gorakhpur Escorts ☎️8617370543 🔝 💃 Enjoy 24/7 Escort Service En...
Call Girls In Gorakhpur Escorts ☎️8617370543 🔝 💃 Enjoy 24/7 Escort Service En...Call Girls In Gorakhpur Escorts ☎️8617370543 🔝 💃 Enjoy 24/7 Escort Service En...
Call Girls In Gorakhpur Escorts ☎️8617370543 🔝 💃 Enjoy 24/7 Escort Service En...
 
Haridwar Call Girls, 8699214473 Hot Girls Service Haridwar
Haridwar Call Girls, 8699214473 Hot Girls Service HaridwarHaridwar Call Girls, 8699214473 Hot Girls Service Haridwar
Haridwar Call Girls, 8699214473 Hot Girls Service Haridwar
 
Unnao 💋 Call Girl 8617370543 Call Girls in unnao Escort service book now
Unnao 💋 Call Girl 8617370543 Call Girls in unnao Escort service book nowUnnao 💋 Call Girl 8617370543 Call Girls in unnao Escort service book now
Unnao 💋 Call Girl 8617370543 Call Girls in unnao Escort service book now
 
Dahod Call Girl 📞 8617370543 Low Price Genuine Service
Dahod Call Girl 📞 8617370543 Low Price Genuine ServiceDahod Call Girl 📞 8617370543 Low Price Genuine Service
Dahod Call Girl 📞 8617370543 Low Price Genuine Service
 
Call Girls in Ernakulam - 9332606886 Our call girls are sure to provide you w...
Call Girls in Ernakulam - 9332606886 Our call girls are sure to provide you w...Call Girls in Ernakulam - 9332606886 Our call girls are sure to provide you w...
Call Girls in Ernakulam - 9332606886 Our call girls are sure to provide you w...
 
Ambassa Escorts | 8617370543 call girls service for all Users
Ambassa Escorts | 8617370543 call girls service for all UsersAmbassa Escorts | 8617370543 call girls service for all Users
Ambassa Escorts | 8617370543 call girls service for all Users
 
Call girls Service Dombivli - 9332606886 Our call girls are sure to provide y...
Call girls Service Dombivli - 9332606886 Our call girls are sure to provide y...Call girls Service Dombivli - 9332606886 Our call girls are sure to provide y...
Call girls Service Dombivli - 9332606886 Our call girls are sure to provide y...
 
Call Girls Moradabad Just Call 8617370543 Top Class Call Girl Service Available
Call Girls Moradabad Just Call 8617370543 Top Class Call Girl Service AvailableCall Girls Moradabad Just Call 8617370543 Top Class Call Girl Service Available
Call Girls Moradabad Just Call 8617370543 Top Class Call Girl Service Available
 
Badshah Nagar ] Call Girls Service Lucknow | Starting ₹,5K To @25k with A/C 9...
Badshah Nagar ] Call Girls Service Lucknow | Starting ₹,5K To @25k with A/C 9...Badshah Nagar ] Call Girls Service Lucknow | Starting ₹,5K To @25k with A/C 9...
Badshah Nagar ] Call Girls Service Lucknow | Starting ₹,5K To @25k with A/C 9...
 
🌹Bhubaneswar🌹Ravi Tailkes ❤CALL GIRL 9777949614 ❤CALL GIRLS IN bhubaneswar E...
🌹Bhubaneswar🌹Ravi Tailkes  ❤CALL GIRL 9777949614 ❤CALL GIRLS IN bhubaneswar E...🌹Bhubaneswar🌹Ravi Tailkes  ❤CALL GIRL 9777949614 ❤CALL GIRLS IN bhubaneswar E...
🌹Bhubaneswar🌹Ravi Tailkes ❤CALL GIRL 9777949614 ❤CALL GIRLS IN bhubaneswar E...
 

Makalah pk

  • 1. MAKALAH PEMROGRAMAN KOMPUTER 1 Disusun untuk memenuhi tugas Ujian Tengah Semester Mata Kuliah Pemrogaman Komputer 1 Dosen Pengampu: Wildan Suharso. S.Si Oleh : Muhammad Sukron 10610067 JURUSAN MATEMATIKA FAKULTAS SAINS DAN TEKNOLOGI UNIVERSITAS ISLAM NEGERI MAULANA MALIK IBRAHIM MALANG 2012
  • 2. BAB I FLOWCHART 1.1 Irisan, Gabungan dan Komplemen Start dipilih() as char nilai, nilai2 as integer f, g,h as string A()as string = a.Split(pecah) B()as string = b.Split(pecah) S()as string = s.Split(pecah) f = TextBox1.Text g = TextBox2.Text h = TextBox3.Text For i = 0 To Ubound(A) For j = 0 To Ubound(B) If A (i)= B (j) B A C
  • 3. B A C ListBox1.Items.Add(A (i)) for i=0 to Ubound (A) ListBox2.Items.Add(A(i)) for j = 0 to Ubound (B) for k = 0 to Ubound (A) If B(j) < > A(k) E D F
  • 4. E D F nilai = nilai + 1 If nilai > A.Length - 1 ListBox2.Items.Add(B(j)) nilai = 0 for i = 0 to Ubound (S) for j = 0 to Ubound (A) I H J
  • 5. I H J If S(i) <> A(j) Nilai2 += 1 If x > A.Length - 1 ListBox3.Items.Add(S(i)) Nilai2 = 0 Stop
  • 6. 1.2 Selection Sort irisan A dan B Start i, r , q, m, n As Integer r = ListBox1.Items.Count - 1 selec_irisan(r) As Integer For i = 0 To r Selec_irisan(i) = ListBox1.Items(i) For i = 0 To selec_irisan. length 1 m = i For q = i + 1 To selec_irisan.Length- 1 M K N
  • 7. M K N If selec_ irisan (q) < selec_irisan(m) m=q If m <> i n = selec_irisan (i) selec_irisan(i) = selec_irisan(m) selec_irisan(m) = n For p = 0 To selec_irisan.Length - 1 TextBox4.AppendText(CStr(se lec_irisan(p)) & " ") Stop
  • 8. 1.3 Selection Sort Gabungan A dan B Start min, temp, y As Integer y = ListBox2.Items.Count - 1 gabunganAB(x) As Integer For i = 0 To y Selec_gabungan (i) = ListBox2.Items(i) For i = 0 To Selc_gabungn.Length-1 min = i For j = i + 1 To Selec_gabungan.Length - 1 P O Q
  • 9. P O Q If Selec_gabungan (j) < Selec_gabungan (min) min = j If min <> i temp = Selec_gabungan (i) Selec_gabungan (i) = Selec_gabungan(m) Selec_gabungan (min) = temp For p= 0 To Selec_gabungan.Length -1 TextBox4.AppendText(CStr(ga Selec_gabungan (p)) & " ") Stop
  • 10. 1.4 Selection Sort komplemen A terhadap S Start km, kp, z As Integer z = ListBox3.Items.Count - 1 selec_komplemn(z) As Integer For i = 0 To z selec_komplemn (i) = ListBox3.Items(i) For i = 0 To selc_komplmn.Length-1 km = i For j = i + 1 To selec_komplemn.Length - 1 S R T
  • 11. P O Q If selec_komplemn (j) < selc_komplmn (km) km = j If km < > i kp = selec_komplemn (i) selec_komplmn (i) = selc_komplmn (km) selec_komplemn (km) = kp For p= 0 To selec_komplemn.Length -1 TextBox4.AppendText(CStr(k selec_komplemn (p)) & " ") Stop
  • 12. BAB II PESEUDOCODE 2.1 Irisan For i = 0 to Ubound[A] { For j = 0 to Ubound[B] If A[i]=B[j] } } 2.2 Gabungan For i = 0 to Ubound[B] { For j = 0 to Ubound[A] If B[i]< >A[j] Nilai = nilai + 1 If nilai > A.length – 1 Nilai = 0 } } 2.3 Komplemen For i = 0 to Ubound[S] {
  • 13. For j = 0 to Ubound[A] If S[i]< >A[j] Nilai2 + = 1 If nilai2 > A.length – 1 Nilai2 = 0 } } 2.4 Selection Irisan For i = 0 to selec_irisan.length – 1{ m=i for q = i + 1 to selec_irisan.length – 1 if selec_irisan [q] < selec_irisan [m] m=0 if m < > i n= selec_irisan [i] selec_irisan [i] = selec_irisan [m] selec_irisan [m] = n } }
  • 14. 2.5 Selection Gabungan For i = 0 to selec_gabungan.length – 1{ min = i for j = i + 1 to selec_gabunga.length – 1 if selec_gabungan [j] < selec_gabungan [min] min = j if min < > i temp = selec_gabungan [i] selec_ gabungan [i] = selec_gabungan [min] selec_ gabungan [min] = temp } } 2.6 Selection Komplemen For i = 0 to selec_komplemen.length – 1{ km = i for j = i + 1 to selec_komplemen.length – 1 if selec_komplemen [j] < selec_komplemen [km] km = j
  • 15. if km < > i kp = selec_komplemen [i] selec_komplemen [i] = selec_komplemen [km] selec_komplemen [km] = kp } }
  • 17. BAB IV SOURCE Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim dipilih() As Char = {".", ",", "*", " "} Dim f, g, h As String Dim nilai, nilai2 As Integer nilai = 0 nilai2 = 0 f = TextBox1.Text g = TextBox2.Text h = TextBox3.Text Dim A() As String = f.Split(dipilih) Dim B() As String = g.Split(dipilih) Dim S() As String = h.Split(dipilih) 'irisan For i = 0 To UBound(A) For j = 0 To UBound(B) If A(i) = B(j) Then ListBox1.Items.Add(A(i)) End If Next Next 'gabungan For i = 0 To UBound(A) ListBox2.Items.Add(A(i)) Next For i = 0 To UBound(B) For j = 0 To UBound(A) If B(i) <> A(j) Then nilai = nilai + 1 End If Next If nilai > A.Length - 1 Then ListBox2.Items.Add(B(i)) End If nilai = 0 Next 'komplemen
  • 18. For i = 0 To UBound(S) For j = 0 To UBound(A) If S(i) <> A(j) Then nilai2 += 1 End If Next If nilai2 > A.Length - 1 Then ListBox3.Items.Add(S(i)) End If nilai2 = 0 Next End Sub Private Sub Label13_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label13.Click Refresh() TextBox1.Text = "" TextBox2.Text = "" TextBox3.Text = "" TextBox4.Text = "" TextBox5.Text = "" TextBox6.Text = "" ListBox1.Text = "" ListBox2.Text = "" ListBox3.Text = "" End Sub Private Sub Label15_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label15.Click MsgBox("muhammad sukron" + vbCrLf + "10610067") End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click 'sort irirsan Dim i, r, q, m, n As Integer r = ListBox1.Items.Count - 1 Dim selec_irisan(r) As Integer For i = 0 To r selec_irisan(i) = ListBox1.Items(i) Next For i = 0 To selec_irisan.Length - 1 m = i For q = i + 1 To selec_irisan.Length - 1
  • 19. If selec_irisan(q) < selec_irisan(m) Then m = q End If Next If m <> i Then n = selec_irisan(i) selec_irisan(i) = selec_irisan(m) selec_irisan(m) = n End If Next For p = 0 To selec_irisan.Length - 1 TextBox4.AppendText(" " + CStr(selec_irisan(p))) Next 'sort gabungan Dim min, temp, y As Integer y = ListBox2.Items.Count - 1 Dim selec_gabungan(y) As Integer For i = 0 To y selec_gabungan(i) = ListBox2.Items(i) Next For i = 0 To selec_gabungan.Length - 1 min = i For j = i + 1 To selec_gabungan.Length - 1 If selec_gabungan(j) < selec_gabungan(min) Then min = j End If Next If min <> i Then temp = selec_gabungan(i) selec_gabungan(i) = selec_gabungan(min) selec_gabungan(min) = temp End If Next For p = 0 To selec_gabungan.Length - 1 TextBox5.AppendText(" " + CStr(selec_gabungan(p))) Next 'sort komplemen Dim km, kp, z As Integer z = ListBox3.Items.Count - 1 Dim selec_komplemen(z) As Integer
  • 20. For i = 0 To z selec_komplemen(i) = ListBox3.Items(i) Next For i = 0 To selec_komplemen.Length - 1 km = i For j = i + 1 To selec_komplemen.Length - 1 If selec_komplemen(j) < selec_komplemen(km) Then km = j End If Next If km <> i Then kp = selec_komplemen(i) selec_komplemen(i) = selec_komplemen(km) selec_komplemen(km) = kp End If Next For p = 0 To selec_komplemen.Length - 1 TextBox6.AppendText(" " + CStr(selec_komplemen(p))) Next End Sub End Class