Anda di halaman 1dari 4

import java.io.

*;
class Quiz1{
public static void main (String[]args) throws IOException{
BufferedReader br=new BufferedReader (new InputStreamReader(System.in));
System.out.print("Masukan Jumlah Baris: ");
int baris = Integer.parseInt(br.readLine());
System.out.print("Masukan Jumlah Kolom: ");
int kolom = Integer.parseInt(br.readLine());

int data[][] = new int[baris][kolom];


int[] total_baris = new int[baris];
int total_kabe =0;
for (int i=0; i<baris; i++) {
for (int j=0; j<kolom; j++) {
System.out.print("Masukan baris ke-"+(i+1)+" kolom ke-"+(j+1)+" : ");
data[i][j] = Integer.parseInt(br.readLine()); }}
for (int i=0; i<baris; i++) {
int total =0;
for (int j=0; j<kolom; j++) {
total=total+data[i][j];
total_kabe=total_kabe+data[i][j];
System.out.print(data[i][j]+" "); }
total_baris[i]=total;
System.out.println(); }
System.out.println("Total Keseluruhan adalah: "+total_kabe);
}}
If (Kondisi_1) then
If (Kondisi_1A) then
Tahap Proses 1A
Else If (Kondisi_1B) then
Tahap Proses 1B
Else
Tahap Proses 1C
End If
Else If (Kondisi_2) then
If (Kondisi_2A) then
Tahap Proses 2A
Else If (Kondisi_2B) then
Tahap Proses 2B
Else
Tahap Proses 2C
End If
Else
……….
End If

If (Kondisi_1) then
Tahap Proses 1
Else If (Kondisi_2) then
Tahap Proses 2
Else If (Kondisi_3) then
Tahap Proses 3
…..
Else If (Kondisi_N) then
Tahap Proses N
Else
Tahap Proses Selain
Proses 1 sampai N
End If

Anda mungkin juga menyukai