SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

Tendances (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
 

En vedette

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
 

En vedette (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"
 

Similaire à 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
 

Similaire à 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
 

Plus de Venta Adrian, S.Kom

Plus de 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
 

Dernier

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdfChristopherTHyatt
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
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
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 

Dernier (20)

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
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
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 

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);