Untuk judul bebas namun harus sama dengan public class nya.
langsung comot aja.
class latihan3{ public static void main(String [] args){ int x,y; x = 19; y = 5 ; System.out.println (" x = " + x); System.out.println (" y = " + y); System.out.println (" x + y = " + (x+y)); System.out.println (" x - y = " + (x-y)); System.out.println (" x * y = " + (x*y)); System.out.println (" x / y = " + (x/y)); System.out.println (" x % y = " + (x%y)); } } |
Hasil Running program diatas
0 komentar: