herrDeng網內搜尋

自訂搜尋

Ads

2016年9月14日 星期三

[影片]針對ex1的討論與修改

作業ex1
並利用迴圈、陣列改寫。

52 則留言:

b10433026 提到...

package hw2;
public class ex1 {
public static void main(String[] args) {
int x[]={33,45,87,99,27};
int sum=0;
for(int a:x)
sum+=a;
System.out.println(sum);
System.out.println(sum/5.0);
}
}

B10433023李佳明 提到...

public class ez {
public static void main(String[] args) {
int x []={33,45,87,99,27};
int sum=0;
for(int a:x)
sum+=a;
System.out.println("總和 = "+sum);
System.out.println("平均 = "+sum/5.0);
}
}



總和 = 291
平均 = 58.2


B10433044吳玉瀚 提到...

public class a01 {
public static void main(String[] args) {
int [] A={33,45,87,99,27};
int SUM=0;
for(int i:A)SUM+=A[i];
System.out.println(SUM/5);
}
}

B10433027 提到...

public class ex01

{

public static void main(String[] args)

{

int x[]={33, 45, 87, 99, 27};

int sum=0;

for(int a:x)

sum+=a;

System.out.println(sum);

System.out.println(sum/5.0);

}

}

B10433042 提到...

public class ex2 {

public static void main(String[] args) {
int x[]={33,45,87,99,27};
int sum=0;
for(int a:x)
sum+=a;
System.out.println(sum);
System.out.println(sum/5.0);
}

}

B10433014 提到...

public class taaa
{

public static void main(String[] args)
{
int x[]={33,45,87,99,27};
int sum=0;
for(int a:x)
sum+=a;
System.out.println(sum);
System.out.println(sum/5.0);
}


}

B10433036 提到...

public class ex1b {

public static void main(String[] args) {
int x[]={33,45,87,99,27};
int sum=0;
for(int a:x)
sum+=a;
System.out.println(sum);
System.out.println(sum/5.0);

}

}

B10433046 提到...

public class ex2 {

public static void main(String[] args) {
int x[]={33,45,87,99,27};
int sum=0;
for(int a:x)
sum+=a;
System.out.println(sum);
System.out.println(sum/5.0);
}

}

B10433019李佳潔 提到...

public class hw1 {
public static void main(String[] args) {
int x[]={33,45,87,99,27};
int sum=0;
for(int a:x)
sum+=a;
System.out.println(sum);
System.out.println(sum/5.0);
}
}

B10433037 提到...

public class ex1 {

public static void main(String[] args) {
int x[]={33,45,87,99,27};
int sum=0;
for(int a:x)
sum+=a;
System.out.println(sum);
System.out.println(sum/5.0);
}

}

B10233028 提到...

public class ex01 {

public static void main(String[] args) {
int x[]={33,45,87,99,27};
int sum=0;
for(int a:x)
sum+=a;
System.out.println(sum);
System.out.println(sum/5.0);
}

}

B10433007張聖鑫 提到...

class ex01 {

public static void main(String[] args) {
int x[]={33,45,87,99,27};
int sum=0;
for(int a:x)
sum+=a;
System.out.println(sum);
System.out.println(sum/5.0);

}

}

B10433008王靖雲 提到...

public class ex01 {

public static void main(String[] args) {
int x[]={33,45,87,99,27};
int sum=0;
for (int a:x)
sum+=a;
System.out.println("加總:"+sum);
System.out.println("平均:"+sum/5.0);

}

}

B10433068丁麗馨 提到...

public class ex1 {

public static void main(String[] args) {

int x[]={33,45,87,99,27};

int sum=0;

for(int a:x)

sum+=a;

System.out.println(sum);

System.out.println(sum/5.0);

}

}

B10433006張正祺 提到...

public class ex1 {

public static void main(String[] args) {

int x[]={33,45,87,99,27};

int sum =0;

for(int a:x)

sum+=a;

System.out.println(sum);

System.out.println(sum/5.0);

}

}

B10433020沈柏軍 提到...

public class ex1 {

public static void main(String[] args) {

int x[]={33,45,87,99,27};

int sum=0;

for(int a:x)

sum+=a;

System.out.println(sum);

System.out.println(sum/5.0);

}

}

B10433049 提到...

public class ex1 {

public static void main(String[] args) {

int x[]={33,45,87,99,27};

int sum =0;

for(int a:x)

sum+=a;

System.out.println(sum);

System.out.println(sum/5.0);

}

}

B10433054 孫若庭 提到...

public class hw1 {

public static void main(String[] args) {
int x[]={33,45,87,99,27};
int sum=0;
for(int a:x)
sum+=a;
System.out.println(sum);
System.out.println(sum/5.0);

}

}

B10433005 沈沛姍 提到...

public class ex1 {

public static void main(String[] args) {
int x[]={33,45,87,99,27};
int sum=0;
for(int a:x)
sum+=a;
System.out.println(sum);
System.out.println(sum/5.0);
}
}

B10433022 提到...

public class ex1 {

public static void main(String[] args) {
int x[]={33,45,87,99,27};
int sum=0;

for (int a:x)
sum+=a;
System.out.println(sum);
System.out.println(sum/5.0);
}

}

B10333010陳彥逸 提到...

public class ex01 {

public static void main(String[] args) {
int x[]={33,45,87,99,27};
int sum=0;
for(int a:x)
sum+=a;
System.out.print(sum);
System.out.print(sum/5.0);



}

}

B10333010陳彥逸 提到...

public class ex01 {

public static void main(String[] args) {
int x[]={33,45,87,99,27};
int sum=0;
for(int a:x)
sum+=a;
System.out.print(sum);
System.out.print(sum/5.0);



}

}

B10333022李昕翰 提到...

public class B10333022 {

public static void main(String[] args) {
int x[]={33,45,87,99,27};
int sum=0;
for(int a:x)
sum+=a;
System.out.print(sum);
System.out.print(sum/5.0);


}
}

楊家睿 B10433030 提到...

public class ez {
public static void main(String[] args) {
int x []={33,45,87,99,27};
int sum=0;
for(int a:x)
sum+=a;
System.out.println("總和 = "+sum);
System.out.println("平均 = "+sum/5.0);
}
}

莊孟軒b10433051 提到...

public class ez {
public static void main(String[] args) {
int x []={33,45,87,99,27};
int sum=0;
for(int a:x)
sum+=a;
System.out.println("總和 = "+sum);
System.out.println("平均 = "+sum/5.0);
}
}

B10433031陳頌恩 提到...

package ex1;

public class exa {

public static void main(String[] args) {
int x[]={33,45,87,99,27};
int sum=0;
for(int a:x)
sum+=a;
System.out.println(sum);
System.out.println(sum/5.0);
}

}

B10433010吳奇峰 提到...

package ex1;

public class exa {

public static void main(String[] args) {
int x[]={33,45,87,99,27};
int sum=0;
for(int a:x)
sum+=a;
System.out.println(sum);
System.out.println(sum/5.0);
}

}

B10433189杜恩瑋 提到...

package ex1;

public class exa {

public static void main(String[] args) {
int x[]={33,45,87,99,27};
int sum=0;
for(int a:x)
sum+=a;
System.out.println(sum);
System.out.println(sum/5.0);
}

}
 

B10433032 劉鍵佑 提到...


public class hw1 {

public static void main(String[] args) {
int x[]={33,45,87,99,27};
int sum=0;
for(int a:x)
sum+=a;
System.out.println(sum);
System.out.println(sum/5.0);

}

}

B10433188 姜佩萱 提到...

public class ex1 {

public static void main(String[] args) {
int x[]={33,45,87,99,27};
int sum=0;
for(int a:x)
sum+=a;
System.out.println(sum);
System.out.println(sum/5.0);


}

}

B10433190 張文翰 提到...

public class ex1 {

public static void main(String[] args) {
int x[]={33,45,87,99,27};
int sum=0;
for(int a:x)
sum+=a;
System.out.println(sum);
System.out.println(sum/5.0);


}

}

B10433189 杜恩瑋 提到...

public class ex1 {

public static void main(String[] args) {
int x[]={33,45,87,99,27};
int sum=0;
for(int a:x)
sum+=a;
System.out.println(sum);
System.out.println(sum/5.0);


}

}

B10433037 提到...

public class ex2 {

public static void main(String[] args) {
int A=76;
int B=72;
int C=82;
int D=94;
int E=75;
int F=74;
int G=75;
int H=77;
double a=(A+B+C+D)*2.0;
double b=(E+F+G)*3.0;
double c=(H)*4.0;
System.out.println((a+b+c)/21);

}

}

B10433015 提到...

public class ex01 {
public static void main(String[] args) {
int x[]={33, 45, 87, 99, 27};
int sum=0;
for(int a:x)
sum+=a;
System.out.println(sum);
System.out.println(sum/5.0);
}
}

B10433022 提到...

package b2;

public class p4 {

public static void main(String[] args) {
int x[]={65,78,80,72,66};
int sum=0;
for(int a:x)
sum+=a;
System.out.println(sum);
System.out.println(sum/5.0);

}

}

B10433028 提到...

public class ex2 {

public static void main(String[] args) {
int A=65;
int B=66;
int C=99;
int D=99;
int E=99;
int F=76;
int G=87;
int H=87;
double a=(A+B+C+D)*2.0;
double b=(E+F+G)*3.0;
double c=(H)*4.0;
System.out.println((a+b+c)/21);

}

}

B10433039遊叡恩 提到...

public class hw1 {

public static void main(String[] args) {
int x[]={33,45,87,99,27};
int sum=0;
for(int a:x)
sum+=a;
System.out.println(sum);
System.out.println(sum/5.0);

}

}

B10433039游叡恩 提到...

public class hw1 {

public static void main(String[] args) {
int x[]={33,45,87,99,27};
int sum=0;
for(int a:x)
sum+=a;
System.out.println(sum);
System.out.println(sum/5.0);

}

}

B104333050徐佳偉 提到...

public class ez {
public static void main(String[] args) {
int x []={33,45,87,99,27};
int sum=0;
for(int a:x)
sum+=a;
System.out.println("總和 = "+sum);
System.out.println("平均 = "+sum/5.0);
}
}

b10433030 楊家睿 提到...

public class ez {
public static void main(String[] args) {
int x []={33,45,87,99,27};
int sum=0;
for(int a:x)
sum+=a;
System.out.println("總和 = "+sum);
System.out.println("平均 = "+sum/5.0);
}
}

B10233049 黃家崙 提到...

public class ez {
public static void main(String[] args) {
int x []={33,45,87,99,27};
int sum=0;
for(int a:x)
sum+=a;
System.out.println("總和 = "+sum);
System.out.println("平均 = "+sum/5.0);
}
}

B10433040 葉峻宇 提到...

public class hw1 {

public static void main(String[] args) {
int x[]={33,45,87,99,27};
int sum=0;
for(int a:x)
sum+=a;
System.out.println(sum);
System.out.println(sum/5.0);

}

}

b10433021 提到...

public class hw1 {

public static void main(String[] args) {
int x[]={33,45,87,99,27};
int sum=0;
for(int a:x)
sum+=a;
System.out.println(sum);
System.out.println(sum/5.0);

}

}

b10433024 陳錡諹 提到...

public class ez {
public static void main(String[] args) {
int x []={33,45,87,99,27};
int sum=0;
for(int a:x)
sum+=a;
System.out.println("總和 = "+sum);
System.out.println("平均 = "+sum/5.0);
}
}

B10433083林綾萱 提到...

public class ex1 {

public static void main(String[] args) {
int x[]={33,45,87,99,27};
int sum=0;
for(int a:x)
sum+=a;
System.out.println(sum);
System.out.println(sum/5.0);


}

}

B10433066劉民崧 提到...

public class ex1 {

public static void main(String[] args) {
int x[]={33,45,87,99,27};
int sum=0;
for(int a:x)
sum+=a;
System.out.println(sum);
System.out.println(sum/5.0);


}

}

B10433083林綾萱 提到...

public class ex1 {

public static void main(String[] args) {
int x[]={33,45,87,99,27};
int sum=0;
for(int a:x)
sum+=a;
System.out.println(sum);
System.out.println(sum/5.0);


}

}

B10433066劉民崧 提到...

public class ex1 {

public static void main(String[] args) {
int x[]={33,45,87,99,27};
int sum=0;
for(int a:x)
sum+=a;
System.out.println(sum);
System.out.println(sum/5.0);


}

}

B10433025羅亦志 提到...

public class a01 {
public static void main(String[] args) {
int [] A={33,45,87,99,27};
int SUM=0;
for(int i:A)SUM+=A[i];
System.out.println(SUM/5);
}
}

B10233187 張郁柔 提到...

public class ex1 {

public static void main(String[] args) {
int x[]={33,45,87,99,27};
int sum=0;
for(int a:x)
sum+=a;
System.out.println(sum);
System.out.println(sum/5.0);


}

}

B10233136 巫駿驛 提到...

public class ex1 {

public static void main(String[] args) {
int x[]={33,45,87,99,27};
int sum=0;
for(int a:x)
sum+=a;
System.out.println(sum);
System.out.println(sum/5.0);


}

}

b10433043彭子豪 提到...

public class ex1 {

public static void main(String[] args) {
int x[]={33,45,87,99,27};
int sum=0;
for(int a:x)
sum+=a;
System.out.println(sum);
System.out.println(sum/5.0);


}

}

Related Posts Plugin for WordPress, Blogger...

熱門文章