Singkat Postingan, Tugas dari pelajaran Algoritma & Pemrograman.
Memposting Suatu Program yang dikerjakan sebelumnya.
Nama : JAMALUDIN.A
Nim : 181021400098
Bentuk sederhana dari Perulangan FOR.
1.Deskripsi Program
- Mulai
- Deklarasi Variabel SISI,Keliling.
- Input : SISI
- Proses : 4*SISI
- Jika Input < 3 Maka Ulangi Langkah sampai-3 Kali
- Tampilkan Luas
- Selesai
2.Flowchart
3.Hasil atau Keluaran
4.Code Program
((
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author Element
*/
import java.util.Scanner;
public class jama {
private static double KELILING;
private static double SISI;
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
Scanner Inputnya=new Scanner (System.in);
for(int B=0;B<3;B++){
System.out.print("+ Masukan Nilai SISI =");
SISI=Inputnya.nextDouble();
KELILING=4*SISI;
System.out.println("- Jadi Keliling Layang-Layang Adalah ="+KELILING);
System.out.println("_________________________________");
}
}
}
))
Jadi, Itulah Tadi perulangan FOR . dan semoga pembelajaran ini semoga bermanfaat. Terima kasih
Wassalammualaikum Wr.Wb.