assalamualaikum..
he3.. arie niew kitew share basic java.. hahaha..
kisah d dlm lab.. kne dere ngan madem ani.. wat cordim sebanyk yg bole'' hahaha''
----->> wat latihanyg nie'' haaaa yg nie kamo kne wat jgk'' keyh yg nie ag;'!!
hahahaha''
keyh.. kitew amik sbgai cabaran;'))
pening2
pening2
nie cording application.
import java.util.*;
public class application
{
public static void main(String[] args)
{
Scanner input=new Scanner(System.in);
System.out.println("Enter the name : ");
String name=input.next();
System.out.println("Enter the age : ");
int age=input.nextInt();
System.out.println("Enter the height : ");
double height=input.nextDouble();
System.out.println("Enter the weight : ");
double weight=input.nextDouble();
System.out.println("name:"+name+"\nage"+age+ "\nheight"+height+"\nweight"+weight);
char n=name.charAt(0);
System.out.println("first name : " + n);
}
}
(( xyah la output die'')) tngk cordimm jep''
nie cordim calculation
import java.util.*;
public class calculatoin
{
public static void main(String[] args)
{
Scanner input=new Scanner(System.in);
int no1,no2,no3;
int sumNum;
double avg;
System.out.println("enter number 1 : ");
no1=input.nextInt();
System.out.println("enter number 2 : ");
no2=input.nextInt();
System.out.println("enter number 3 : ");
no3=input.nextInt();
sumNum = no1+no2+no3;
avg = sumNum/3;
System.out.println("the sum of "+no1+" + "+no2+" + "+no3+" "+sumNum);
System.out.println("the sum of "+no1+" + "+no2+" + "+no3+" "+avg);
}
}
nie c0rdim w0rd
import java.util.*;
import java.io.*;
import javax.swing.*;
import java.util.Scanner;
class Word
{
public static void main(String[] args)
{
Scanner input=new Scanner(System.in);
System.out.print("Enter two words : ");
String s = input.next();
String j = input.next();
System.out.println("You are enter "+s+" "+j);
char a = s.charAt(0);
System.out.println("The first letter for first word : "+a);
char b = j.charAt(0);
System.out.println("The first letter for first word : "+b);
String c = s.substring(0,4);
System.out.println("The first word : "+c);
String d = j.substring(0,4);
System.out.println("The second word : "+d);
int x = s.length() + j.length();
System.out.println("The length of the words enter : "+x);
}
}
p/s;huhuhuhu.. udah la uwh.. ckop la'' pening plk nnti ngan salah seekor alien nie;'!! <3'' not l0ve it
No comments:
Post a Comment