Advertisement
royyanxpoll

Soal No.2

Dec 17th, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. public static void main(String[] args) {
  2.  
  3. double x, y;
  4.  
  5. x = HargaBarang(100000,250000,2500);
  6. y = Modal(2680000,1000000);
  7. System.out.println("hasil penjualannya adalah "+x);
  8. System.out.println("hasil keuntungannya adalah"+y);
  9.  
  10. }
  11.  
  12. public static double HargaBarang(double tas, double sepatu,double kaoskaki){
  13. return tas*3+sepatu*7+kaoskaki*252;
  14. }
  15. public static double Modal(double hasil, double keuntungan){
  16. return hasil-keuntungan;
  17.  
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement