herrDeng網內搜尋

自訂搜尋

Ads

2016年9月14日 星期三

ex4

算上學期加權平均

56 則留言:

B10433019李佳潔 提到...

public class hw2 {
public static void main(String[] args) {
int x[]={76,75,85,81,95,87,70,95,83,66};
int sum=0;
for(int a:x)
sum+=a;
System.out.println(sum);
System.out.println(sum/10.0);
}
}

B10433005 沈沛姍 提到...

public class ex2 {

public static void main(String[] args) {
int x[]={90,83,82,70,82,74,91,81,60,92,70,72};
int sum=0;
for(int a:x)
sum+=a;
System.out.println(sum);
System.out.println(sum/12.0);
}
}

B10433054 孫若庭 提到...

public class hw2 {

public static void main(String[] args) {
int x[]={87,90,83,83,84,85,91,84,61,94,83,86};
int sum=0;
for(int a:x)
sum+=a;
System.out.println(sum);
System.out.println(sum/12.0);

}

}

B10433031陳頌恩 提到...

package ex1;

public class exb {

public static void main(String[] args) {
int x[]={88,90,68,76,76,76,66,89,82,85};
int sum=0;
for(int a:x)
sum+=a;
System.out.println(sum);
System.out.println(sum/10.0);

}

}

B10433053謝肇安 提到...

package hw2;

import java.util.Scanner;

public class ex2 {

public static void main(String[] args) {
int a[]=new int [5];
int b[]=new int [5];
Scanner input=new Scanner(System.in);
for (int i=0; i<=4;i++){
System.out.println("輸入期末成績=");
a[i] = input.nextInt();
System.out.println("輸入學分數=");
b[i] = input.nextInt();
int sum=a[i]*b[i];
System.out.println("加權分數="+sum);
{
for(int x=0;x<=0;x++){
int sum1=0;
sum1+=sum;
System.out.println("加權平均分數="+sum1/3.0);
}
}
}
}
}

B10433038詹恭煒 提到...

package hw2;

import java.util.Scanner;

public class ex2 {

public static void main(String[] args) {
int a[]=new int [5];
int b[]=new int [5];
Scanner input=new Scanner(System.in);
for (int i=0; i<=4;i++){
System.out.println("輸入期末成績=");
a[i] = input.nextInt();
System.out.println("輸入學分數=");
b[i] = input.nextInt();
int sum=a[i]*b[i];
System.out.println("加權分數="+sum);
{
for(int x=0;x<=0;x++){
int sum1=0;
sum1+=sum;
System.out.println("加權平均分數="+sum1/3.0);
}
}
}
}
}

B10433194謝旻君 提到...

package hw2;

import java.util.Scanner;

public class ex2 {

public static void main(String[] args) {
int a[]=new int [5];
int b[]=new int [5];
Scanner input=new Scanner(System.in);
for (int i=0; i<=4;i++){
System.out.println("輸入期末成績=");
a[i] = input.nextInt();
System.out.println("輸入學分數=");
b[i] = input.nextInt();
int sum=a[i]*b[i];
System.out.println("加權分數="+sum);
{
for(int x=0;x<=0;x++){
int sum1=0;
sum1+=sum;
System.out.println("加權平均分數="+sum1/3.0);
}
}
}
}
}

B10433193林佩縈 提到...

package hw2;

import java.util.Scanner;

public class ex2 {

public static void main(String[] args) {
int a[]=new int [5];
int b[]=new int [5];
Scanner input=new Scanner(System.in);
for (int i=0; i<=4;i++){
System.out.println("輸入期末成績=");
a[i] = input.nextInt();
System.out.println("輸入學分數=");
b[i] = input.nextInt();
int sum=a[i]*b[i];
System.out.println("加權分數="+sum);
{
for(int x=0;x<=0;x++){
int sum1=0;
sum1+=sum;
System.out.println("加權平均分數="+sum1/3.0);
}
}
}
}
}

B10433185施慧齡 提到...

package hw2;

import java.util.Scanner;

public class ex2 {

public static void main(String[] args) {
int a[]=new int [5];
int b[]=new int [5];
Scanner input=new Scanner(System.in);
for (int i=0; i<=4;i++){
System.out.println("輸入期末成績=");
a[i] = input.nextInt();
System.out.println("輸入學分數=");
b[i] = input.nextInt();
int sum=a[i]*b[i];
System.out.println("加權分數="+sum);
{
for(int x=0;x<=0;x++){
int sum1=0;
sum1+=sum;
System.out.println("加權平均分數="+sum1/3.0);
}
}
}
}
}

B10433018張易儒 提到...

package hw2;

import java.util.Scanner;

public class ex2 {

public static void main(String[] args) {
int a[]=new int [5];
int b[]=new int [5];
Scanner input=new Scanner(System.in);
for (int i=0; i<=4;i++){
System.out.println("輸入期末成績=");
a[i] = input.nextInt();
System.out.println("輸入學分數=");
b[i] = input.nextInt();
int sum=a[i]*b[i];
System.out.println("加權分數="+sum);
{
for(int x=0;x<=0;x++){
int sum1=0;
sum1+=sum;
System.out.println("加權平均分數="+sum1/3.0);
}
}
}
}
}

B10433010吳奇峰 提到...

package ex1;

public class exb {

public static void main(String[] args) {
int x[]={88,70,68,70,66,76,66,79,82,85};
int sum=0;
for(int a:x)
sum+=a;
System.out.println(sum);
System.out.println(sum/10.0);

}

}

B10433032 劉鍵佑 提到...


public class hw2 {

public static void main(String[] args) {
int x[]={62,70,45,80,60,60,64,78,70,65};
int sum=0;
for(int a:x)
sum+=a;
System.out.println(sum);
System.out.println(sum/10.0);

}

}

B10433021呂志信 提到...

public class ex01 {

public static void main(String[] args) {
int x[]={78,85,60,77,71,67,70,86,81,68};
int sum=0;
for(int a:x)
sum+=a;
System.out.println(sum);
System.out.println(sum/10.0);


}
}

b10433026 提到...

package hw2;
public class ex3 {
public static void main(String[] args) {
int a=80 ;
int b=79 ;
int c=75 ;
int d=70 ;
int e=80 ;
int f=65 ;
int g=84 ;
int h=90 ;
int i=95 ;
int sum=(a+b+c)*2;
int sum1=(d+e+f)*3;
int sum2=(g+h+i)*4;
System.out.println((sum+sum1+sum2)/27.0);
}
}

B10433009蔡佩樺 提到...

public class hw2 {
public static void main(String[] args) {
int x[]={80,93,77,78,91,88,60,94,67,80};
int sum=0;
for(int a:x)
sum+=a;
System.out.println(sum);
System.out.println(sum/10.0);
}
}

B10433026 提到...

package W2;
import java.util.Scanner;
public class hw3 {
public static void main(String[] args) {
int a[] = new int [5];
Scanner x = new Scanner(System.in);
for(int i =0; i<a.length; i++){
System.out.println("請輸入第"+i+"數字");
a[i] = x.nextInt();
}
int m= a[0];
for (int i =0; i<a.length;i++){
m=(a[0]*1)+(a[1]*3)+(a[2]*2)+(a[3]*4)+(a[4]*2);
}
System.out.println("加總成績="+m);
System.out.println("加總平均成績="+m/12.0);
}
}

B10433027 提到...

import java.util.Scanner;

public class ex01 {

public static void main(String[] args) {

int a[]=new int [5];

Scanner x=new Scanner(System.in);

for (int i = 0; i
System.out.println("輸入數值"+i+"分數");

a[i]=x.nextInt();

}

int m=a[0];

for (int i = 0; i < a.length; i++) {

m=(a[0]*2)+(a[1]*4)+(a[2]*3)+(a[3]*4)+(a[4]*2);

}

System.out.println("加權平均="+m/15.0);

}



}

B10433015 提到...

public class ex4 {
public static void main(String[] args) {
int s[]={82, 60, 60, 97, 66, 66, 60, 76, 89, 60, 68};
int c[]={0, 2, 2, 2, 3, 2, 2, 3, 2, 0, 0};
float result=0;
float sum_c=0;
double ans;
for(int i=0; i<s.length; i++){
result+=s[i]*c[i];
sum_c+=c[i];
}
ans=result/sum_c;
System.out.printf("%.1f", ans);
}
}

B10333022李昕翰 提到...

public static void main(String[] args) {
int x[]={82,80,74,60,62,65,60,72,68,85};
int sum=0;
for(int a:x)
sum+=a;
System.out.print(sum);
System.out.print(sum/22.0);

}

}

B10433023 李佳明 提到...

public class ex4
{
public static void main(String[] args)
{
int A[]={88,90,92,91,80,96,91,98,91,90,80};
int B[]={0,2,2,2,3,2,2,3,2,0,0};
int sum_x=0,sum_y=0;
for(int i=0; i<A.length;i++)
{
sum_x+=A[i]*B[i];
sum_y+=B[i];
}

System.out.println("加權平均數 = "+(float)sum_x/sum_y);
}
}



加權平均數 =90.888885

B10433036 提到...

public class ex1 {

public static void main(String[] args) {
int A=84;
int B=90;
int C=100;
int D=77;
int E=91;
int F=72;
int G=87;
int H=79;
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);

}

}

B10433028 提到...

public class hw1 {

public static void main(String[] args) {
int x[]={66,76,88,73,98,99,76,90,90,87,76,77};
int sum=0;
for(int a:x)
sum+=a;
System.out.println(sum);
System.out.println(sum/12.0);

}

}

B10333010陳彥逸 提到...

public class hw2 {

public static void main(String[] args) {
int x[]={68,78,85,89,60,67,60,72,62,84};
int sum=0;
for(int a:x)
sum+=a;
System.out.print(sum);
System.out.print(sum/10.0);

}

}

B10433037 提到...

public class ex02 {

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);
}

}

B10433037 提到...

public class ex02 {

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);
}

}

B10433042 提到...

public class eeeee {

public static void main(String[] args) {
int scores[]={77,63,72,81,80,68,78,66,69,70};
int credits[]={3,0,2,3,3,2,1,3,3,0};
int c=0, Sum=0;
for(int i=0;i<5;i++){
Sum+=credits[i]*scores[i];
c+=credits[i];
}
System.out.println((double)Sum/c);
}

}

B10433022 提到...

package b2;

public class P3 {

public static void main(String[] args) {
int scores[]={76,88,70,85,83,72};
int credits[]={2,3,4,3,2,3};
int c=0,sum=0;
for(int i=0;i<5;i++){
sum+=credits[i]*scores[i];
c+=credits[i];

}
System.out.println((double)sum/c);
}

}

B10433039 提到...

public class ex4
{
public static void main(String[] args)
{
int A[]={88,90,92,91,80,96,91,98,91,90,80};
int B[]={0,2,2,2,3,2,2,3,2,0,0};
int sum_x=0,sum_y=0;
for(int i=0; i<A.length;i++)
{
sum_x+=A[i]*B[i];
sum_y+=B[i];
}

System.out.println("加權平均數 = "+(float)sum_x/sum_y);
}
}

B10333010陳彥逸 提到...

public class EX04 {

public static void main(String[] args) {
int scores[]={68, 78, 85, 89, 60, 67, 60, 72, 62, 84};
int credits[]={1, 2, 2, 3, 3, 3, 3, 1, 3, 0};
int c=0, sum=0;
for(int i=0; i<10; i++){
sum+=credits[i]*scores[i];
c+=credits[i];
}
System.out.print((double)sum/c);

B10433029宋狄淯 提到...

public class ex1 {

public static void main(String[] args) {
int A=84;
int B=90;
int C=100;
int D=97;
int E=91;
int F=92;
int G=87;
int H=90;
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);

}

}

B10333022李昕翰 提到...

public class EX04 {

public static void main(String[] args) {
int scores[]={82, 80, 74, 62, 62, 65, 60, 72, 68, 85};
int credits[]={1, 2, 3, 3, 3, 3, 3, 1, 3, 0};
int c=0, sum=0;
for(int i=0; i<10; i++){
sum+=credits[i]*scores[i];
c+=credits[i];
}
System.out.print((double)sum/c);

B10433008王靖雲 提到...

public class HW2 {

public static void main(String[] args) {
int scores[]={11,67,89,76};
int credits[]={2,3,4,2};
int c=0,sum=0;
for(int i=0;i<4;i++){
sum+=credits[i]*scores[i];
c+=credits[i];

B10433020沈柏軍 提到...

public class ex2 {

public static void main(String[] args) {

int scores[]={77,67,89,76};

int credits[]={2, 3, 4, 2};

int c=0, sum=0;

for(int i=0; i<4; i++){

sum+=credits[i]*scores[i];

c+=credits[i];

}

System.out.println((double)sum/c);

}

}

B10433039游叡恩 提到...

public class hw2 {
public static void main(String[] args) {
int x[]={80,93,77,78,91,88,60,94,67,80};
int sum=0;
for(int a:x)
sum+=a;
System.out.println(sum);
System.out.println(sum/10.0);
}
}

B10433068丁麗馨 提到...

public class hw2 {

public static void main(String[] args) {
int scores[]={77,67,89,76};
int credits[]={2,3,4,2};
int c=0,sum=0;
for(int i=0; i<4;i++){
sum+=credits[i]*scores[i];
c+=credits[i];
}
System.out.println((double)sum/c);
}

}

B10233136 巫駿驛 提到...

public class hw2 {

public static void main(String[] args) {
int x[]={68,78,85,89,60,67,60,72,62,84};
int sum=0;
for(int a:x)
sum+=a;
System.out.print(sum);
System.out.print(sum/10.0);

}

}

B10433007張聖鑫 提到...

package date1;

public class ex00000 {

public static void main(String[] args) {

int number=0;
int sum=0;

int x[]={85,88,82,77,72,75,65,81,67,70};
int y[]={2,2,2,3,2,2,3,2,0,0};

for(int i=0; i<x.length; i++){
number += x[i]*y[i];
sum += y[i];
}

System.out.println("加權平均:"+ number/sum);
System.out.println("學期總分:"+ sum);

}

}

B10433006張正祺 提到...

public class EX2 {

public static void main(String[] args) {

int scores[]={77,67,89,76};

int credits[]={2,3,4,2};

int c=0, sum=0;

for(int i=0; i<4; i++){

sum+=credits[i]*scores[i];

c+=credits[i];

}

System.out.println((double)sum/c);

}

}

B10433007張聖鑫 提到...

package date1;

public class ex00000 {

public static void main(String[] args) {

int number=0;
int sum=0;

int x[]={85,88,82,77,72,75,65,81,67,70};
int y[]={2,2,2,3,2,2,3,2,0,0};

for(int i=0; i<x.length; i++){
number += x[i]*y[i];
sum += y[i];
}

System.out.println("加權平均:"+ number/sum);
System.out.println("學期總分:"+ sum);

}

}

B10233136 巫駿驛 提到...

public class hw2 {

public static void main(String[] args) {
int x[]={68,78,85,89,60,67,60,72,62,84};
int sum=0;
for(int a:x)
sum+=a;
System.out.print(sum);
System.out.print(sum/10.0);

}

}

b10233028 提到...

public class hw2 {

public static void main(String[] args) {
int x[]={85,78,76,80,85,80,76,77,62};
int sum=0;
for(int a:x)
sum+=a;
System.out.print(sum);
System.out.print(sum/9.0);

}

}

B104333050徐佳偉 提到...

public class ex4
{
public static void main(String[] args)
{
int A[]={88,90,92,91,80,96,91,98,91,90,80};
int B[]={0,2,2,2,3,2,2,3,2,0,0};
int sum_x=0,sum_y=0;
for(int i=0; i<A.length;i++)
{
sum_x+=A[i]*B[i];
sum_y+=B[i];
}

System.out.println("加權平均數 = "+(float)sum_x/sum_y);
}
}


B10433029 宋狄淯 提到...

public class hw2 {
public static void main(String[] args) {
int x[]={80,93,77,78,91,88,60,94,67,80};
int sum=0;
for(int a:x)
sum+=a;
System.out.println(sum);
System.out.println(sum/10.0);
}
}

b10433030 楊家睿 提到...

package hw2;

import java.util.Scanner;

public class ex2 {

public static void main(String[] args) {
int a[]=new int [5];
int b[]=new int [5];
Scanner input=new Scanner(System.in);
for (int i=0; i<=4;i++){
System.out.println("輸入期末成績=");
a[i] = input.nextInt();
System.out.println("輸入學分數=");
b[i] = input.nextInt();
int sum=a[i]*b[i];
System.out.println("加權分數="+sum);
{
for(int x=0;x<=0;x++){
int sum1=0;
sum1+=sum;
System.out.println("加權平均分數="+sum1/3.0);
}
}
}
}
}

B10433014楊偉杰 提到...

package b2;

public class P3 {

public static void main(String[] args) {
int scores[]={76,88,70,85,83,72};
int credits[]={2,3,4,3,2,3};
int c=0,sum=0;
for(int i=0;i<5;i++){
sum+=credits[i]*scores[i];
c+=credits[i];

}
System.out.println((double)sum/c);
}

}

B10233177吳國豪 提到...

public class ex4
{
public static void main(String[] args)
{
int A[]={88,90,92,91,80,96,91,98,91,90,80};
int B[]={0,2,2,2,3,2,2,3,2,0,0};
int sum_x=0,sum_y=0;
for(int i=0; i<A.length;i++)
{
sum_x+=A[i]*B[i];
sum_y+=B[i];
}

System.out.println("加權平均數 = "+(float)sum_x/sum_y);
}
}

B10433044吳玉瀚 提到...

public class ex1{

public static void main(String[] args) {

int number=0;
int sum=0;

int x[]={85,88,82,77,72,75,65,81,67,70};
int y[]={2,2,2,3,2,2,3,2,0,0};

for(int i=0; i<x.length; i++){
number += x[i]*y[i];
sum += y[i];
}

System.out.println("加權平均:"+ number/sum);
System.out.println("學期總分:"+ sum);

}

}

B10233049 黃家崙 提到...

package hw2;

import java.util.Scanner;

public class ex2 {

public static void main(String[] args) {
int a[]=new int [5];
int b[]=new int [5];
Scanner input=new Scanner(System.in);
for (int i=0; i<=4;i++){
System.out.println("輸入期末成績=");
a[i] = input.nextInt();
System.out.println("輸入學分數=");
b[i] = input.nextInt();
int sum=a[i]*b[i];
System.out.println("加權分數="+sum);
{
for(int x=0;x<=0;x++){
int sum1=0;
sum1+=sum;
System.out.println("加權平均分數="+sum1/3.0);
}
}
}
}
}

B10433040 葉峻宇 提到...

public class EX2 {

public static void main(String[] args) {

int scores[]={77,67,89,76};

int credits[]={2,3,4,2};

int c=0, sum=0;

for(int i=0; i<4; i++){

sum+=credits[i]*scores[i];

c+=credits[i];

}

System.out.println((double)sum/c);

}

}

b10433049 宋子文 提到...

public class eeeee {

public static void main(String[] args) {
int scores[]={77,63,72,81,80,68,78,66,69,70};
int credits[]={3,0,2,3,3,2,1,3,3,0};
int c=0, Sum=0;
for(int i=0;i<5;i++){
Sum+=credits[i]*scores[i];
c+=credits[i];
}
System.out.println((double)Sum/c);
}

}

b10433051 提到...

package hw2;

import java.util.Scanner;

public class ex2 {

public static void main(String[] args) {
int a[]=new int [5];
int b[]=new int [5];
Scanner input=new Scanner(System.in);
for (int i=0; i<=4;i++){
System.out.println("輸入期末成績=");
a[i] = input.nextInt();
System.out.println("輸入學分數=");
b[i] = input.nextInt();
int sum=a[i]*b[i];
System.out.println("加權分數="+sum);
{
for(int x=0;x<=0;x++){
int sum1=0;
sum1+=sum;
System.out.println("加權平均分數="+sum1/3.0);
}
}
}
}
}

b10433024 陳錡諹 提到...

package hw2;

import java.util.Scanner;

public class ex2 {

public static void main(String[] args) {
int a[]=new int [5];
int b[]=new int [5];
Scanner input=new Scanner(System.in);
for (int i=0; i<=4;i++){
System.out.println("輸入期末成績=");
a[i] = input.nextInt();
System.out.println("輸入學分數=");
b[i] = input.nextInt();
int sum=a[i]*b[i];
System.out.println("加權分數="+sum);
{
for(int x=0;x<=0;x++){
int sum1=0;
sum1+=sum;
System.out.println("加權平均分數="+sum1/3.0);
}
}
}
}
}

B10433083林綾萱 提到...

package hw2;

import java.util.Scanner;

public class ex2 {

public static void main(String[] args) {
int a[]=new int [5];
int b[]=new int [5];
Scanner input=new Scanner(System.in);
for (int i=0; i<=4;i++){
System.out.println("輸入期末成績=");
a[i] = input.nextInt();
System.out.println("輸入學分數=");
b[i] = input.nextInt();
int sum=a[i]*b[i];
System.out.println("加權分數="+sum);
{
for(int x=0;x<=0;x++){
int sum1=0;
sum1+=sum;
System.out.println("加權平均分數="+sum1/3.0);
}
}
}
}
}

B10433066劉民崧 提到...

package hw2;

import java.util.Scanner;

public class ex2 {

public static void main(String[] args) {
int a[]=new int [5];
int b[]=new int [5];
Scanner input=new Scanner(System.in);
for (int i=0; i<=4;i++){
System.out.println("輸入期末成績=");
a[i] = input.nextInt();
System.out.println("輸入學分數=");
b[i] = input.nextInt();
int sum=a[i]*b[i];
System.out.println("加權分數="+sum);
{
for(int x=0;x<=0;x++){
int sum1=0;
sum1+=sum;
System.out.println("加權平均分數="+sum1/3.0);
}
}
}
}
}

B10433025羅亦志 提到...

public class ex1{

public static void main(String[] args) {

int number=0;
int sum=0;

int x[]={85,88,82,77,72,75,65,81,67,70};
int y[]={2,2,2,3,2,2,3,2,0,0};

for(int i=0; i<x.length; i++){
number += x[i]*y[i];
sum += y[i];
}

System.out.println("加權平均:"+ number/sum);
System.out.println("學期總分:"+ sum);

}

}

B10233187 張郁柔 提到...

package hw2;

import java.util.Scanner;

public class ex2 {

public static void main(String[] args) {
int a[]=new int [5];
int b[]=new int [5];
Scanner input=new Scanner(System.in);
for (int i=0; i<=4;i++){
System.out.println("輸入期末成績=");
a[i] = input.nextInt();
System.out.println("輸入學分數=");
b[i] = input.nextInt();
int sum=a[i]*b[i];
System.out.println("加權分數="+sum);
{
for(int x=0;x<=0;x++){
int sum1=0;
sum1+=sum;
System.out.println("加權平均分數="+sum1/3.0);
}
}
}
}
}

Related Posts Plugin for WordPress, Blogger...

熱門文章