[偷可] 程設....
唉.....
頭好痛
昨天整晚沒睡
送我哥他新馬子(瑞士人
去機場
兩點去6點半回到家...........
剛上語文表達超想睡覺~"~
最近用GOOGLE查到一個國小三四年級同學,會不會有點誇張XDDDDD
而且她也是鄉民 (看到來回一下啊XDD
是個台北醫學院的強者!!!!
現在程設來練吧XD
class ptt
{
private static double pi=3.14;
private static double r;
//provate static double area;
private ptt(double fa)
{
r=fa;
//area=pi*r*r;
}
public void show()
{
System.out.println("area="+pi*r*r);
}
}
public class fate
{
public static void main(String args)
{
ptt pt[]=new ptt[3];
pt[0]=new fa(1,0);
pt[1]=new fa(2,0);
pt[2]=new fa(3,0);
}
}
9-13
class CScore
{
private String name;
private int math;
private int eng;
private CScore(String str,int m,int e)
{
name=str;
math=m;
eng=e;
}
public void mathAvg(CScore c[])
{
int sum=0;
for(int i=0;i<c.length;i++)
sum+=c[i].math;
System.out.println("The average of math is "+math");
System.out.println((double)sum/c.length);
//return(double)sum/c.length;
}
public void mathTop(CScore c[])
{
int max=c[0].math;
String str=c[0].name;
for(int i=0;i<c.length;i++)
{
if (c[i].math>max)
{
max=c[i].math;
str=c[i].name;
}
}
System.out.println("The top score of math is "+math");
System.out.println("The name is "+str);
public void engAvg(CScore c[])
{
int sum=0;
for(int i=0;i<c.length;i++)
sum+=c[i].eng;
System.out.println("The average of english is ");
System.out.println((double)sum/c.length);
//return(double)sum/c.length;
}
public void engTop(CScore c[])
{
int max=c[0].eng;
String str=c[0].name;
for(int i=0;i<c.length;i++)
{
if (c[i].eng>max)
{
max=c[i].eng;
str=c[i].name;
}
}
System.out.println("The top score of english is "+eng");
System.out.println("The name is "+str);
public void show (CScore c[])
{
System.out.println("Name"+"/t"+"Math"+"\t"+"English+"\t");
for (int i=0;i<c.lenth;i++)
{
System.out.println(c[i].name+"\t"+c[i].math+"\t"+c[i].neglish+"\t");
}
}
}
puvlic class app9_13
{
public static void main(String args[])
{
CScore sco[]=new CScore
sco[0]=new CScore("Fiona",86, 92);
sco[1]=new CScore("Ryan",95, 79);
sco[2]=new CScore("Ariel,81, 83);
sco[0].show(score);
sco[0].mathAvg(score);
sco[0].matTop(score);
sco[0].engTop(score);
}
}
幹亂掉了
幫我改到好= =
不知道抄的亂七八遭.................
會有多少錢呢
拭目以待
禾斗禾斗
幫我修^^ (遞卡
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.129.26.2
→
12/19 11:58, , 1F
12/19 11:58, 1F
→
12/19 15:45, , 2F
12/19 15:45, 2F
→
12/19 15:46, , 3F
12/19 15:46, 3F
噓
12/19 22:31, , 4F
12/19 22:31, 4F
噓
12/19 23:20, , 5F
12/19 23:20, 5F
→
12/19 23:20, , 6F
12/19 23:20, 6F
→
12/19 23:25, , 7F
12/19 23:25, 7F
噓
12/20 11:29, , 8F
12/20 11:29, 8F
→
12/20 11:43, , 9F
12/20 11:43, 9F
→
12/22 02:23, , 10F
12/22 02:23, 10F
討論串 (同標題文章)