SHARE
TWEET

tugas operator Bela Priska Gloria

belapriska99 Sep 18th, 2019 (edited) 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.util.Scanner;
  2. public class Tugas2{
  3.     public static void main (String [] args){
  4.         Scanner masuk = new Scanner (System.in);
  5.         int i;
  6.         int j;
  7.         int SisaBagi;
  8.         int jumlah;
  9.         int minus;
  10.         int kali;
  11.         int bagi;
  12.  
  13.         System.out.print(" Masukkan angka ke-1 : ");
  14.         i=masuk.nextInt();
  15.        
  16.         System.out.print (" Masukkan angka ke-2 : ");
  17.         j=masuk.nextInt();
  18.  
  19.         SisaBagi= i % j;
  20.         jumlah=i + j;
  21.         minus=i - j;
  22.         kali= i * j;
  23.         bagi=i % j;
  24.  
  25.         System.out.println (" ");
  26.         System.out.println (" Sisa Pembagian = "+ SisaBagi);
  27.         System.out.println (" ");
  28.         System.out.println (" Jumlah bilangan ="+ jumlah);
  29.         System.out.println (" ");
  30.         System.out.println (" hasil pengurangan ="+ minus);
  31.         System.out.println (" ");
  32.         System.out.println (" hasil perkalian ="+ kali);
  33.         System.out.println (" ");
  34.         System.out.println (" hasil pembagian ="+ bagi);
  35.     }
  36. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top