Modul 78

  • Uploaded by: Gandalivs
  • 0
  • 0
  • June 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Modul 78 as PDF for free.

More details

  • Words: 531
  • Pages: 8
7.2.1. Array merupakan struktur data yang menyimpan kumpulan nilai tipe data yang sama Cara pendeklarasian : Type_data nama_array=new Type_data[ukuran]; berikut contoh SourceCode : int Data[]=new int[100]; 7.2.2 Flowchart :

START ukuran; Data[ukuran];

for(int i =0;i
Max(x[],max)

Min(x[],max)

daMax=x[0];

daMin=x[0];

for(int i=0;i<max;i++)

for(int i=0;i<max;i++)

Data[i]=Integer.parseInt(xx.readLine()) ;

for(int i =0;i
“Data[i]”

x[i]>daMax

YA

TIDAK

daMax=x[i];

x[i]
TIDAK

daMax;

daMin;

STOP

STOP

Min(Data,ukuran);

Max(Data,ukuran);

STOP

Output :

YA

daMin=x[i];

Source Code : import java.io.*; class progammod7{ public static void main(String[] args)throws Exception { DataInputStream xx=new DataInputStream(System.in); System.out.print("Inputkan banyak bilangan = "); int ukuran=Integer.parseInt(xx.readLine()); int Data[]=new int[ukuran]; for(int i=0;i
} //cari data max public static void Max(int []x,int max) { int daMax=x[0]; for(int i=0;i<max;i++) { if (x[i]>daMax) { daMax=x[i]; } } System.out.println("Nilai minimal = "+daMax); } //cari data min public static void Min(int []x,int max) { int daMin=x[0]; for(int i=0;i<max;i++) { if (x[i]
System.out.println("\na= "+a); System.out.println("i= "+i); System.out.println("u= "+u); System.out.println("e= "+e); System.out.println("o= "+o); } }

Related Documents

Modul 78
June 2020 18
78
November 2019 36
78
December 2019 50
78
December 2019 38
78
April 2020 32
78
May 2020 23

More Documents from ""

Tug As 9
June 2020 20
Modul 4,5,6 Revisi
June 2020 25
Tugas Praktikum O9
June 2020 16
Modul 78
June 2020 18