* 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 Dian Parirani
*/
public class ifdiskon {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
int totalbelanja,khonguan,tehpucuk,diskon;
khonguan=90000;
tehpucuk=5000;
totalbelanja=khonguan+tehpucuk;
System.out.println(""+totalbelanja);
if(totalbelanja>=75000){
diskon=totalbelanja*20/100;
totalbelanja=totalbelanja-diskon;
System.out.println("diskon=20%\n"+totalbelanja);
}
}
}
Tidak ada komentar:
Posting Komentar