01-11-2010, 04:17 PM
|
#2
|
تاريخ التسجيل: Sep 2009
التخصص: IT
نوع الدراسة: إنتظام
المستوى: الخامس
الجنس: أنثى
المشاركات: 1,200
|
رد: كتابه كود بواسطه برنامج الجافا
::
وعليكم السلآم ورحمة الله وبركـآته..
تفضلي =)
كود PHP:
import java.util.*;
public class Rectang {
public static void main(String[] args) {
double area;
double circu;
double width;
double length;
Scanner in=new Scanner(System.in);
System.out.println("enter length : ");
length=in.nextDouble();
System.out.println("enter width : ");
width=in.nextDouble();
area=width*length;
System.out.println("the area "+area);
circu=(width+length)*2;
System.out.println("the circumefence "+circu);
}
}
::
كود PHP:
import java.util.*;
public class Seconds {
public static void main(String[] args) {
Scanner in=new Scanner(System.in);
int sec;
int min;
int hour;
System.out.println("enter seconds ");
sec=in.nextInt();
hour=(sec/60)/60;
min=((hour*60)-(sec/60))*-1;
int sec2;
sec2=sec-((hour*60*60)+(min*60));
System.out.println(hour+" : "+min+" : "+sec2);
}
}
بـ التوفيق ..^^
|
|
.
ركّـز اهتمـامك على عمـل وآحـد..
وانغمـس فيه..واحتـرق به ..
واعـشقه لـ تكن مـبدعـًا ..
=)
|
|
|
|