Advertisement
Guest User

Untitled

a guest
May 9th, 2021
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class primitive
  4. {
  5. public static void main(String[] args) {
  6. Scanner sc = new Scanner(System.in);
  7. int A,B,C;
  8. A=120000;
  9. B=600000;
  10. C =(int)( A+B);
  11. System.out.println(C);
  12. System.out.println("masukan nilai 1");
  13. int D=sc.nextInt();
  14. System.out.println("masukan nilai 2");
  15. int E=sc.nextInt();
  16. int F=(int)(D+E);
  17. System.out.println("hasil "+ F);
  18.  
  19. }
  20. }
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement