Rabu, 02 Oktober 2013

struktur algoritma pemrograman


By on 09.36

rstruktur algoritma pemrograman:
  1. mulai
  2. masukan input p
  3. masukan input l
  4. procces (masukan rumus luas persegi panjang luas= p*l)
  5. cetak hasil luas
  6. selesai
flowchart
















source code

import java.util.Scanner;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */


/**
 *
 * @author Faiz
 */
public class LuasPersegiPanjang {
    private static String luas;

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        Scanner masuk = new Scanner (System.in);
       
        System.out.print("masukan panjang :");
        int p =masuk.nextInt();

        System.out.print("masukan lebar :");
        int l = masuk.nextInt();
        
        int luas = p*l;
        
        System.out.print("luasnya adalah: " +luas );
        
    }
}

screenshoot:

About Syed Faizan Ali

Faizan is a 17 year old young guy who is blessed with the art of Blogging,He love to Blog day in and day out,He is a Website Designer and a Certified Graphics Designer.

0 komentar:

Posting Komentar