import java.util.*;
public class kasir {
/**
* @param args
*/
public static void main (String[]args){
//TODO Auto-generated method stub
Scanner kasir = new Scanner (System.in);
int a,b,c,d;
System.out.print("Masukkan harga barang : ");
a = kasir.nextInt();
System.out.print("Diskon yang di berikan : ");
b = kasir.nextInt();
c = a * b/100;
System.out.println("diskon Rp "+c);
d = a - c;
System.out.println("total harga: "+d);
}
}
nih....saya ngasi liat output programnya,,,
0 komentar:
Posting Komentar