SlideShare ist ein Scribd-Unternehmen logo
1 von 5
Nama : Venta Adrian Ahnaf
NIM : 10508447
Kelas : MI-9

   1. Program Mencari Nilai Minimum

      uses crt;
      type
         arrint = array[1..10] of integer;
      var
        mins :integer;
        tabint:arrint;
        nn       : integer;
        i : integer;
      function minimum(tabint : arrint ; n : integer):integer;
      var
        i:byte;
        min:byte;
      begin
                 min:=tabin2[1];
                 for i:=2 to n do
                 if min > tabin2[i] then
                 min := tabint[i];
                 minimum :=min;
      end;
      begin
      clrscr;
      write('Jumlah elemen= ');readln(nn);
      for i := 1 to nn do
      begin
                 write('elemen ke-',i,'=');readln(tabint2[i]);
      end;
      mins := minimum (tabint,nn);
      writeln('Nilai Minimum = ', mins);
      readln;
      end.




       OUTPUT:
2. Program Mencari indeks dimana Nilai minimum disimpan

    OUTPUT
uses crt;
type                                                     OUTPUT :
    arrint = array[1..10] of integer;
var
   imins :integer;
   tabint:arrint;
   nn,i :integer;
function iminimum(tabint : arrint; n:integer):integer;
var
i,imin :integer;
. begin
imin := 1;
for i:=2 to n do
    if tabint2[imin] > tabint2 [i] then
    imin :=i;
    iminimum := imin;
end;
begin
clrscr;
write('Jumlah elemen= ');readln(nn);
for i := 1 to nn do
begin
write('elemen ke-',i,'=');readln(tabint2[i]);
end;
imins := iminimum (tabint2,nn);
writeln('Indeks Minimum = ',imins);
readln;
end.
3. Program Pengurutan Ascending (terurut membesar)

uses crt;                                  for i:=min to max do
const                                        tabfrek[i]:=0;
 nmax=100;                                  for i:=1 to n do
type                                        tabfrek[tabint[i]]:=tabfrek[tabint[i]]+1;
 arrint=array[0..nmax] of integer;
var                                         j:=0;
 tabint:arrint;                             for i:=min to max do
 n:integer;                                 begin
                                             if tabfrek[i]<>0 then
procedure isidata;                           begin
var                                           for k:=1 to tabfrek[i]do
 i:integer;                                   begin
begin                                          inc(j);
 clrscr;                                       tabint[j]:=i;
  randomize;                                  end;
  for i:=1 to n do                           end;
  tabint[i]:=random(nmax);                  end;
 end;                                      end;
                                           begin
procedure tulisdata;                        clrscr;
var                                         write('jumlah elemen=');readln(n);
 i:integer;                                 isidata;
begin                                       writeln('data sebelum terurut');
 for i:=1 to n do                           tulisdata;
 write(tabint[i],' ');                      hitungurut;
end;                                        writeln;
                                            writeln;
procedure hitungurut;                       writeln('data terurut membesar');
var                                         tulisdata;
 max,min,i,j,k:integer;                     readln;
 tabfrek :arrint;                          end.
begin
 min:=tabint[1];
 for i:=1 to n do
 if tabint[i]<min then                   OUTPUT :
 min:=tabint[i];

 max:=tabint[1];
 for i:=1 to n do
 if tabint[i]>max then
 max:=tabint[i];
4. Nilai top score Bola

uses crt;                                                 gotoxy(5,j);write(name[i]);
type                                                      gotoxy(25,j);write(goal[i]);
  nama = array[1..10] of string;                          j:=j+1;
  gol = array[1..10] of integer;                          end;
var
                                                        end;
  i,n,maks,imaks,j :integer;
  name:nama;                                            begin
  goal:gol;                                               clrscr;
procedure input;                                          input;
begin                                                     view;
    write('Jumlah Data =');readln(n);                     writeln;
    for i:=1 to n do                                      writeln('Top Skor sampai saat ini');
    begin                                                 imaks := imaksimum (goal,n);
            writeln('Data ke-',i,'=');                    writeln('Nama: ',name[imaks]);
             write('Nama = ');readln(name[i]);            maks := maksimum (goal,n);
            write('Jumlah Gol = ');readln(goal[i]);
                                                          writeln('Jumlah Gol: ',maks);
    end;
end;                                                      readln;
function maksimum(bsr : gol ; nn : integer):integer;      end.
var
             i:byte;
            max:byte;
begin                                                   OUTPUT:
            max:=bsr[1];
for i:=2 to nn do
   if max < bsr[i] then
   max := bsr[i];
   maksimum :=max;
end;
function imaksimum(bsr : gol ; nn : integer):integer;
var
             i:byte;
            imax:byte;
begin
            max:=1;
for i:=2 to nn do
   if bsr[imax] < bsr[i] then
   imax := i;
   imaksimum := imax;
end;
procedure view;
begin
    clrscr;
   writeln('Top Skor Liga Tarkam 2009-2010');
    writeln('No Nama             Jumlah Gol');
    writeln('==========================');
       j:=4;
    for i:=1 to n do
    begin
    gotoxy(1,j);write(i);
Algoritma

Weitere ähnliche Inhalte

Was ist angesagt? (20)

Dvst
DvstDvst
Dvst
 
Arrays
ArraysArrays
Arrays
 
Statistics.cpp
Statistics.cppStatistics.cpp
Statistics.cpp
 
Experement no 6
Experement no 6Experement no 6
Experement no 6
 
C questions
C questionsC questions
C questions
 
Big omega
Big omegaBig omega
Big omega
 
Tools.cpp
Tools.cppTools.cpp
Tools.cpp
 
To Infinity & Beyond: Protocols & sequences in Node - Part 2
To Infinity & Beyond: Protocols & sequences in Node - Part 2To Infinity & Beyond: Protocols & sequences in Node - Part 2
To Infinity & Beyond: Protocols & sequences in Node - Part 2
 
C Prog. - Structures
C Prog. - StructuresC Prog. - Structures
C Prog. - Structures
 
C Prog - Strings
C Prog - StringsC Prog - Strings
C Prog - Strings
 
Number
NumberNumber
Number
 
c-programming-using-pointers
c-programming-using-pointersc-programming-using-pointers
c-programming-using-pointers
 
timingExercise
timingExercisetimingExercise
timingExercise
 
String in c
String in cString in c
String in c
 
10 template code program
10 template code program10 template code program
10 template code program
 
CUDA First Programs: Computer Architecture CSE448 : UAA Alaska : Notes
CUDA First Programs: Computer Architecture CSE448 : UAA Alaska : NotesCUDA First Programs: Computer Architecture CSE448 : UAA Alaska : Notes
CUDA First Programs: Computer Architecture CSE448 : UAA Alaska : Notes
 
Pointer level 2
Pointer   level 2Pointer   level 2
Pointer level 2
 
Oop1
Oop1Oop1
Oop1
 
Strings1
Strings1Strings1
Strings1
 
Class array
Class arrayClass array
Class array
 

Andere mochten auch

Beyond the Indonesia the beuties of the Asian
Beyond the Indonesia the beuties of the AsianBeyond the Indonesia the beuties of the Asian
Beyond the Indonesia the beuties of the AsianVenta Adrian, S.Kom
 
Russell strutt coast to capital lep 190911
Russell strutt coast to capital lep 190911Russell strutt coast to capital lep 190911
Russell strutt coast to capital lep 190911Philip Locke
 
Board generic presentation
Board generic presentationBoard generic presentation
Board generic presentationPhilip Locke
 
Lecture 3 - Comm Lab: Web @ ITP
Lecture 3 - Comm Lab: Web @ ITP Lecture 3 - Comm Lab: Web @ ITP
Lecture 3 - Comm Lab: Web @ ITP yucefmerhi
 
Nh forum comms presentation v3
Nh forum comms presentation v3Nh forum comms presentation v3
Nh forum comms presentation v3Philip Locke
 
High growth and Innovation
High growth and InnovationHigh growth and Innovation
High growth and InnovationPhilip Locke
 
Statistika "Systematic Random Sampling"
Statistika "Systematic Random Sampling"Statistika "Systematic Random Sampling"
Statistika "Systematic Random Sampling"Venta Adrian, S.Kom
 

Andere mochten auch (7)

Beyond the Indonesia the beuties of the Asian
Beyond the Indonesia the beuties of the AsianBeyond the Indonesia the beuties of the Asian
Beyond the Indonesia the beuties of the Asian
 
Russell strutt coast to capital lep 190911
Russell strutt coast to capital lep 190911Russell strutt coast to capital lep 190911
Russell strutt coast to capital lep 190911
 
Board generic presentation
Board generic presentationBoard generic presentation
Board generic presentation
 
Lecture 3 - Comm Lab: Web @ ITP
Lecture 3 - Comm Lab: Web @ ITP Lecture 3 - Comm Lab: Web @ ITP
Lecture 3 - Comm Lab: Web @ ITP
 
Nh forum comms presentation v3
Nh forum comms presentation v3Nh forum comms presentation v3
Nh forum comms presentation v3
 
High growth and Innovation
High growth and InnovationHigh growth and Innovation
High growth and Innovation
 
Statistika "Systematic Random Sampling"
Statistika "Systematic Random Sampling"Statistika "Systematic Random Sampling"
Statistika "Systematic Random Sampling"
 

Ähnlich wie Algoritma

Contoh program buble sort dalam pascal
Contoh program buble sort dalam pascalContoh program buble sort dalam pascal
Contoh program buble sort dalam pascalSimon Patabang
 
Program pengurutan data
Program pengurutan dataProgram pengurutan data
Program pengurutan datalinda_rosalina
 
Program Pengurutan Data Dengan Buble Sort
Program Pengurutan Data Dengan Buble SortProgram Pengurutan Data Dengan Buble Sort
Program Pengurutan Data Dengan Buble SortSimon Patabang
 
Contoh Program buble sort dari belakang
Contoh Program buble sort dari belakangContoh Program buble sort dari belakang
Contoh Program buble sort dari belakangSimon Patabang
 
2Bytesprog2 course_2014_c1_sets
2Bytesprog2 course_2014_c1_sets2Bytesprog2 course_2014_c1_sets
2Bytesprog2 course_2014_c1_setskinan keshkeh
 
2Bytesprog2 course_2014_c1_sets
2Bytesprog2 course_2014_c1_sets2Bytesprog2 course_2014_c1_sets
2Bytesprog2 course_2014_c1_setskinan keshkeh
 
Daapracticals 111105084852-phpapp02
Daapracticals 111105084852-phpapp02Daapracticals 111105084852-phpapp02
Daapracticals 111105084852-phpapp02Er Ritu Aggarwal
 
DAA Lab File C Programs
DAA Lab File C ProgramsDAA Lab File C Programs
DAA Lab File C ProgramsKandarp Tiwari
 
Kumpulan contoh-program-pascal
Kumpulan contoh-program-pascalKumpulan contoh-program-pascal
Kumpulan contoh-program-pascalrey25
 
Tugas1
Tugas1Tugas1
Tugas1Av Ri
 
PCA-2 Programming and Solving 2nd Sem.pdf
PCA-2 Programming and Solving 2nd Sem.pdfPCA-2 Programming and Solving 2nd Sem.pdf
PCA-2 Programming and Solving 2nd Sem.pdfAshutoshprasad27
 
PCA-2 Programming and Solving 2nd Sem.docx
PCA-2 Programming and Solving 2nd Sem.docxPCA-2 Programming and Solving 2nd Sem.docx
PCA-2 Programming and Solving 2nd Sem.docxAshutoshprasad27
 
Kumpulan contoh-program-pascal-121209073936-phpapp01
Kumpulan contoh-program-pascal-121209073936-phpapp01Kumpulan contoh-program-pascal-121209073936-phpapp01
Kumpulan contoh-program-pascal-121209073936-phpapp01Defina Iskandar
 
New microsoft office word document
New microsoft office word documentNew microsoft office word document
New microsoft office word documentSyed Umair
 

Ähnlich wie Algoritma (20)

Contoh program buble sort dalam pascal
Contoh program buble sort dalam pascalContoh program buble sort dalam pascal
Contoh program buble sort dalam pascal
 
Program pengurutan data
Program pengurutan dataProgram pengurutan data
Program pengurutan data
 
Program Pengurutan Data Dengan Buble Sort
Program Pengurutan Data Dengan Buble SortProgram Pengurutan Data Dengan Buble Sort
Program Pengurutan Data Dengan Buble Sort
 
Contoh Program buble sort dari belakang
Contoh Program buble sort dari belakangContoh Program buble sort dari belakang
Contoh Program buble sort dari belakang
 
2Bytesprog2 course_2014_c1_sets
2Bytesprog2 course_2014_c1_sets2Bytesprog2 course_2014_c1_sets
2Bytesprog2 course_2014_c1_sets
 
2Bytesprog2 course_2014_c1_sets
2Bytesprog2 course_2014_c1_sets2Bytesprog2 course_2014_c1_sets
2Bytesprog2 course_2014_c1_sets
 
Daapracticals 111105084852-phpapp02
Daapracticals 111105084852-phpapp02Daapracticals 111105084852-phpapp02
Daapracticals 111105084852-phpapp02
 
DAA Lab File C Programs
DAA Lab File C ProgramsDAA Lab File C Programs
DAA Lab File C Programs
 
week-4x
week-4xweek-4x
week-4x
 
Kumpulan contoh-program-pascal
Kumpulan contoh-program-pascalKumpulan contoh-program-pascal
Kumpulan contoh-program-pascal
 
Kumpulan program pascal
Kumpulan program pascalKumpulan program pascal
Kumpulan program pascal
 
Ada file
Ada fileAda file
Ada file
 
Tugas1
Tugas1Tugas1
Tugas1
 
ECE-PYTHON.docx
ECE-PYTHON.docxECE-PYTHON.docx
ECE-PYTHON.docx
 
PCA-2 Programming and Solving 2nd Sem.pdf
PCA-2 Programming and Solving 2nd Sem.pdfPCA-2 Programming and Solving 2nd Sem.pdf
PCA-2 Programming and Solving 2nd Sem.pdf
 
PCA-2 Programming and Solving 2nd Sem.docx
PCA-2 Programming and Solving 2nd Sem.docxPCA-2 Programming and Solving 2nd Sem.docx
PCA-2 Programming and Solving 2nd Sem.docx
 
Cpds lab
Cpds labCpds lab
Cpds lab
 
Kumpulan contoh-program-pascal-121209073936-phpapp01
Kumpulan contoh-program-pascal-121209073936-phpapp01Kumpulan contoh-program-pascal-121209073936-phpapp01
Kumpulan contoh-program-pascal-121209073936-phpapp01
 
New microsoft office word document
New microsoft office word documentNew microsoft office word document
New microsoft office word document
 
array.ppt
array.pptarray.ppt
array.ppt
 

Mehr von Venta Adrian, S.Kom

Mehr von Venta Adrian, S.Kom (7)

Makalah Sistem Informasi Rental Komik
Makalah Sistem Informasi Rental KomikMakalah Sistem Informasi Rental Komik
Makalah Sistem Informasi Rental Komik
 
OSI "Open System Interconnection"
OSI "Open System Interconnection"OSI "Open System Interconnection"
OSI "Open System Interconnection"
 
sistem Informasi Nilai UAS SMA 4 Cimahi
sistem Informasi Nilai UAS SMA 4 Cimahisistem Informasi Nilai UAS SMA 4 Cimahi
sistem Informasi Nilai UAS SMA 4 Cimahi
 
Artikel Kepemimpinan Partisipatif
Artikel Kepemimpinan PartisipatifArtikel Kepemimpinan Partisipatif
Artikel Kepemimpinan Partisipatif
 
Sistem Informasi Pembayaran Rek. Listrik
Sistem Informasi Pembayaran Rek. ListrikSistem Informasi Pembayaran Rek. Listrik
Sistem Informasi Pembayaran Rek. Listrik
 
proses bisnis
proses bisnisproses bisnis
proses bisnis
 
Internet
InternetInternet
Internet
 

Kürzlich hochgeladen

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 

Kürzlich hochgeladen (20)

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 

Algoritma

  • 1. Nama : Venta Adrian Ahnaf NIM : 10508447 Kelas : MI-9 1. Program Mencari Nilai Minimum uses crt; type arrint = array[1..10] of integer; var mins :integer; tabint:arrint; nn : integer; i : integer; function minimum(tabint : arrint ; n : integer):integer; var i:byte; min:byte; begin min:=tabin2[1]; for i:=2 to n do if min > tabin2[i] then min := tabint[i]; minimum :=min; end; begin clrscr; write('Jumlah elemen= ');readln(nn); for i := 1 to nn do begin write('elemen ke-',i,'=');readln(tabint2[i]); end; mins := minimum (tabint,nn); writeln('Nilai Minimum = ', mins); readln; end. OUTPUT:
  • 2. 2. Program Mencari indeks dimana Nilai minimum disimpan OUTPUT uses crt; type OUTPUT : arrint = array[1..10] of integer; var imins :integer; tabint:arrint; nn,i :integer; function iminimum(tabint : arrint; n:integer):integer; var i,imin :integer; . begin imin := 1; for i:=2 to n do if tabint2[imin] > tabint2 [i] then imin :=i; iminimum := imin; end; begin clrscr; write('Jumlah elemen= ');readln(nn); for i := 1 to nn do begin write('elemen ke-',i,'=');readln(tabint2[i]); end; imins := iminimum (tabint2,nn); writeln('Indeks Minimum = ',imins); readln; end.
  • 3. 3. Program Pengurutan Ascending (terurut membesar) uses crt; for i:=min to max do const tabfrek[i]:=0; nmax=100; for i:=1 to n do type tabfrek[tabint[i]]:=tabfrek[tabint[i]]+1; arrint=array[0..nmax] of integer; var j:=0; tabint:arrint; for i:=min to max do n:integer; begin if tabfrek[i]<>0 then procedure isidata; begin var for k:=1 to tabfrek[i]do i:integer; begin begin inc(j); clrscr; tabint[j]:=i; randomize; end; for i:=1 to n do end; tabint[i]:=random(nmax); end; end; end; begin procedure tulisdata; clrscr; var write('jumlah elemen=');readln(n); i:integer; isidata; begin writeln('data sebelum terurut'); for i:=1 to n do tulisdata; write(tabint[i],' '); hitungurut; end; writeln; writeln; procedure hitungurut; writeln('data terurut membesar'); var tulisdata; max,min,i,j,k:integer; readln; tabfrek :arrint; end. begin min:=tabint[1]; for i:=1 to n do if tabint[i]<min then OUTPUT : min:=tabint[i]; max:=tabint[1]; for i:=1 to n do if tabint[i]>max then max:=tabint[i];
  • 4. 4. Nilai top score Bola uses crt; gotoxy(5,j);write(name[i]); type gotoxy(25,j);write(goal[i]); nama = array[1..10] of string; j:=j+1; gol = array[1..10] of integer; end; var end; i,n,maks,imaks,j :integer; name:nama; begin goal:gol; clrscr; procedure input; input; begin view; write('Jumlah Data =');readln(n); writeln; for i:=1 to n do writeln('Top Skor sampai saat ini'); begin imaks := imaksimum (goal,n); writeln('Data ke-',i,'='); writeln('Nama: ',name[imaks]); write('Nama = ');readln(name[i]); maks := maksimum (goal,n); write('Jumlah Gol = ');readln(goal[i]); writeln('Jumlah Gol: ',maks); end; end; readln; function maksimum(bsr : gol ; nn : integer):integer; end. var i:byte; max:byte; begin OUTPUT: max:=bsr[1]; for i:=2 to nn do if max < bsr[i] then max := bsr[i]; maksimum :=max; end; function imaksimum(bsr : gol ; nn : integer):integer; var i:byte; imax:byte; begin max:=1; for i:=2 to nn do if bsr[imax] < bsr[i] then imax := i; imaksimum := imax; end; procedure view; begin clrscr; writeln('Top Skor Liga Tarkam 2009-2010'); writeln('No Nama Jumlah Gol'); writeln('=========================='); j:=4; for i:=1 to n do begin gotoxy(1,j);write(i);