Advertisement
Guest User

Untitled

a guest
Aug 19th, 2017
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.36 KB | None | 0 0
  1. package tipedata;
  2. /**
  3.  *
  4.  * @author ngodinggan
  5.  *
  6.  */
  7. public class ContohChar {
  8.     public static void main(String[] args){
  9.         int a, b, hasil;
  10.         char huruf;
  11.         a = 10;
  12.         b = 2;
  13.         hasil = a + b;
  14.         if( hasil > 10 ){
  15.             huruf = 'A';
  16.             System.out.print("Nilai Anda = " + huruf);
  17.         }else{
  18.             huruf = 'B';
  19.             System.out.print("Nilai Anda = " + huruf);
  20.         }
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement