Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package tipedata;
- /**
- *
- * @author ngodinggan
- *
- */
- public class ContohChar {
- public static void main(String[] args){
- int a, b, hasil;
- char huruf;
- a = 10;
- b = 2;
- hasil = a + b;
- if( hasil > 10 ){
- huruf = 'A';
- System.out.print("Nilai Anda = " + huruf);
- }else{
- huruf = 'B';
- System.out.print("Nilai Anda = " + huruf);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement