herrDeng網內搜尋

自訂搜尋

Ads

2011年9月15日 星期四

算上學期加權平均

算上學期加權平均

68 則留言:

B9933042 提到...

public class B9933042 {


public static void main(String[] args) {
int[] t={65,70,60,93,70,75,85,60};
int[] c={ 2, 2, 2, 3, 3, 3, 3, 3};
int sum=0,cc=0;
for(int i=0;i<t.length;i++)
{
sum+=t[i]*c[i];
cc+=c[i];
}
System.out.println("Sum= "+sum);
System.out.println("Average= "+(sum/cc));
}

}

B9933052 提到...

package P1;

public class B9933052A {


public static void main(String[] args) {
int[] t={73,85,70,85,65,70,90,81};
int[] c={2, 2 ,2 ,3 ,3 ,3 ,3 ,3};
int sum=0,cc=0;
for(int i=0;i<t.length;i++)
{
sum+=t[i]*c[i];
cc+=c[i];
}


System.out.println("Sum= "+sum);
System.out.println("Average= "+(sum/cc));

}

}

B9933041 提到...

package P1;

public class B1 {

public static void main(String[] args) {

int[]t={77,65,76,67,60,88,80,69};
int[]c={ 2, 2, 2, 3, 3, 3, 3, 3};
int sum=0,cc=0;
for(int i=0;i<t.length;i++)
{
sum+=t[i]*c[i];
cc+=c[i];
}
System.out.println("sum="+sum);
System.out.println("Average="+(sum/cc));
}
}

B9933001 提到...

package Aa;

public class Aa {


public static void main(String[] args) {

int a[]={81,88,94,92,85,77,90,84,92,83};
int b[]={2,2,2,0,3,3,3,3,3,0,0};
int sum=0,cc=0;
double average;
for(int i=0;i<10;i++)
{
sum+=a[i]*b[i];
cc+=b[i];
average=(double)sum/cc;
}
System.out.println("average="+average);
}
}

b9933011 提到...

public class b9933011 {


public static void main(String[] args) {
int[]t={78,78,72,72,60,72,80,46};
int[]c={ 2, 2, 2, 3, 3, 3, 3, 3};
int sum=0,cc=0;
for(int i=0;i<t.length;i++)
{
sum+=t[i]*c[i];
cc+=c[i];
}
System.out.println("sum="+sum);
System.out.println("Average="+(sum/cc));
}

}

B9933052 提到...

package P1;

public class B9933052A {


public static void main(String[] args) {
int[] t={73,85,70,85,65,70,90,81};
int[] c={2, 2 ,2 ,3 ,3 ,3 ,3 ,3};
int sum=0,cc=0;
for(int i=0;i<t.length;i++)
{
sum+=t[i]*c[i];
cc+=c[i];
}


System.out.println("Sum= "+sum);
System.out.println("Average= "+(sum/cc));

}

}

B9933019 提到...

public class Ex1java {


public static void main(String[] args) {

int[] t={91,85,97,94,95,97,84,87,92,85,93,79};
int[] c={0,2,2,2,0,3,3,3,3,3,0,0};
int sum=0,cc=0;

for(int i=0;i<11;i++)
{
sum+=t[i]*c[i];
cc+=c[i];

}
System.out.println("sum:"+(float)sum/cc);






}

}

b9733054 提到...

public class b9733054 {


public static void main(String[] args) {

int t[]={80,78,80,65,85,82,60,82,61,69};
int c[]={0,3,1,3,0,2,2,3,3,3};
int sum=0,總學分=0;
int i,avg;
for (i=0;i<10;i++){
sum+=t[i]*c[i];
總學分+=c[i];

}
avg=sum/總學分;
System.out.println("Sum:"+sum);
System.out.println("總學分:"+總學分);
System.out.println("Avg:"+avg);
}

}

B9933012 提到...

package Pack1;

public class B1 {

public static void main(String[] args) {

int t[]={88,74,83,63,70,87,74,86,94,86,92,81};
int c[]={0,2,2,2,0,3,3,3,3,3,0,0,};
int sum=0,cc=0;
for(int i=0; i<t.length; i++)
{
sum+=t[i]*c[i];
cc+=c[i];

}





System.out.println("Average= "+(float)sum/cc);


}


}

B9933038 提到...

package p1;
public class A1 {
public static void main(String[] args) {

int t[]={76,76,65,67,95,94,60,60,71,80,79,74};
int c[]={0, 2, 2, 2, 0, 3, 3, 3, 3, 3, 0, 0};
int sum=0,cc=0;
for(int i=0;i<t.length;i++)
{
sum+=t[i]*c[i];
cc+=c[i];
}
System.out.println("加權平均:"+(float)sum/cc);
}
}

B9933001 提到...

package Aa;

public class Aa {


public static void main(String[] args) {

int a[]={81,88,94,92,85,77,90,84,92,83};
int b[]={2,2,2,0,3,3,3,3,3,0,0};
int sum=0,cc=0;
double average;
for(int i=0;i<10;i++)
{
sum+=a[i]*b[i];
cc+=b[i];

}
average=(double)sum/cc;
System.out.println("average="+average);
}
}

B9933017 提到...

package p1;

public class A1 {


public static void main(String[] args) {
int t[]={82,68,91,78,95,78,38,60,66,71,76,64};
int c[]={0,2,2,2,0,3,3,3,3,3,0,0};
int sum=0,cc=0;
for(int i=0;i<t.length;i++)
{
sum+=t[i]*c[i];
cc+=c[i];

}
System.out.println("加權平均"+(float)sum/cc);

}

}

B9933050 提到...

package pack1;

public class S1 {
public static void main(String[] args) {


int t[]={93,77,83,72,70,83,73,76,90,88,90,80};
int c[]={0,2,2,2,0,3,3,3,3,3,0,0};
int sum=0,cc=0;
for(int i=0;i<t.length;i++)
{
sum+=t[i]*c[i];
cc+=c[i];
}

System.out.println("Average= "+(float)sum/cc);
}

}

B9933040 提到...

public class B1 {



public static void main(String[] args) {

int t[]={80,84,96,80,80,64,80,90,73,89,73};
int c[]={0,2,2,2,0,3,3,3,3,3,0,0};
int sum=0,cc=0;
for(int i=0;i<11;i++)
{
sum+=t[i]*c[i];
cc+=c[i];
}
System.out.println("sum:"+(float)sum/cc);



}

}

b9933024 提到...

package a1;

public class b1 {


public static void main(String[] args) {

int t[]={78,72,70,60,80,61,34,52,74,82,88,72};
int c[]={0,2,2,2,2,0,3,3,3,3,3,0,0};
int sum=0,cc=0;
double average;
for(int i=0;i<12;i++)
{
sum+=t[i]*c[i];
cc+=c[i];

}
average=(double)sum/cc;
System.out.println("average="+average);
}

}

B9933053 提到...

public class B9933053 {
public static void main(String[] args) {
int[]t={73,83,60,67,95,84,69,69,85,82,91,70};
int[]c={0,2,2,2,0,3,3,3,3,3,0,0};

int sum=0,cc=0;

for(int i=0;i<t.length;i++)
{
sum+=t[i]*c[i];
cc+=c[i];
}
System.out.println("sum:"+(float)sum/cc);
}

}

B9933002 提到...

package A1;

public class A1 {


public static void main(String[] args) {

int t[]={92,94,81,95,90,77,84,94,92,88,81};
int c[]={2,2,2,0,3,3,3,3,3,0,0};
int sum=0,cc=0;
double average;
for(int i=0;i<10;i++)
{
sum+=t[i]*c[i];
cc+=c[i];

}
average=(double)sum/cc;
System.out.println("average="+average);
}

}

B9933013 提到...

package pack1;

public class B1 {


public static void main(String[] args) {

int t[] ={90,86,73,80,95,93,76,80,94,73,90,77};
int c[] ={0,2,2,2,0,3,3,3,3,3,0,0};
int sum=0,cc=0;
for(int i=0 ;i<t.length ;i++ )
{
sum+=t[i]*c[i];
cc+=c[i];
}
System.out.println("Average="+(float)sum/cc);
}

}

b9933057 提到...

int t[]={81,69,87,69,80,99,71,72,92,74,71,73};
int c[]={0,2,2,2,0,3,3,3,3,3,0,0};
int sum=0,cc=0;
for(int i=0;i<11;i++)
{
sum+=t[i]*c[i];
cc+=c[i];
}
System.out.println("sum:"+(float)sum/cc);

B9933038 提到...

package p1;
public class A1 {
public static void main(String[] args) {

int t[]={76,76,65,67,95,94,60,60,71,80,79,74};
int c[]={0, 2, 2, 2, 0, 3, 3, 3, 3, 3, 0, 0};
int sum=0,cc=0;
for(int i=0;i<t.length;i++)
{
sum+=t[i]*c[i];
cc+=c[i];
}
System.out.println("加權平均:"+(float)sum/cc);
}
}

b9933016 提到...

package B1;

public class b9933016
{

public static void main(String[] args)
{
int []t={81,71,96,60,85,94,68,73,88,87,92,78};
int []c={0,2,2,2,0,3,3,3,3,3,0,0};

int sum=0,cc=0;

for(int i=0;i<11;i++ )
{
sum+=t[i]*c[i];
cc+=c[i];
}


System.out.println("Average:"+(float)sum/cc);


}

}

B9933054 提到...

package pack1;

public class A1 {

/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
int t[]={81,78,76,82,85,88,72,78,91,85,87,86};
int c[]={0,2,2,2,0,3,3,3,3,3,0,0};
int sum=0,cc=0;
double average;
for(int i=0;i<11;i++)
{
sum+=t[i]*c[i];
cc+=c[i];

}
average=(double)sum/cc;
System.out.println("average="+average);
}


}

B9933042 提到...

public class B9933042 {


public static void main(String[] args) {
int[] t={65,70,60,93,70,75,85,60};
int[] c={ 2, 2, 2, 3, 3, 3, 3, 3};
int sum=0,cc=0;
for(int i=0;i<t.length;i++)
{
sum+=t[i]*c[i];
cc+=c[i];
}
System.out.println("Sum= "+sum);
System.out.println("Average= "+(double)sum/cc);
}

}

B9933025 提到...

package pack1;

public class A1 {

/**
* @param args
*/
public static void main(String[] args)
{
int t []={79,74,87,74,70,78,74,60,90,72,90,75 };
int c []={0, 2, 2, 2, 0, 3, 3, 3, 3, 3, 0, 0};

int sum=0,cc=0;
for(int i=0;i<t.length;i++)
{
sum+=t[i]*c[i];
cc+=c[i];

}

System.out.println("加權平均"+(float)sum/cc);
}

}

b9933056 提到...

package b1;

public class p1 {

public static void main(String[] args) {
int a[]={73,74,62,70,85,71,60,68,85,45,79,74};
int b[]={0,2,2,2,0,3,3,3,3,3,0,0};
int sum=0,cc=0;
double avg;
for (int i=0;i<10;i++)
{
sum+=a[i]*b[i];
cc+=b[i];
}
avg=(double)sum/cc;
System.out.println("avg="+avg);
}
}

b9933009 提到...

public class b11111{

public static void main(String[] args) {

int t[]={79,74,62,91,82,65,76,56,74,67,73};
int c[]={2,2,2,0,3,3,3,3,3,0,0};
int sum=0,cc=0;
double average;
for(int i=0;i<10;i++)
{
sum+=t[i]*c[i];
cc+=c[i];

}
average=(double)sum/cc;
System.out.println("average="+average);
}

}

b9733054 提到...

public class b9733054 {


public static void main(String[] args) {

int t[]={80,78,80,65,85,82,60,82,61,69};
int c[]={0,3,1,3,0,2,2,3,3,3};
int sum=0,總學分=0;
int i,avg;
for (i=0;i<10;i++){
sum+=t[i]*c[i];
總學分+=c[i];

}
avg=sum/總學分;
System.out.println("Sum:"+sum);
System.out.println("總學分:"+總學分);
System.out.println("Avg:"+avg);
}

}

B9933019 提到...

public class Ex1java {


public static void main(String[] args) {

int[] t={91,85,97,94,95,97,84,87,92,85,93,79};
int[] c={0,2,2,2,0,3,3,3,3,3,0,0};
int sum=0,cc=0;

for(int i=0;i<11;i++)
{
sum+=t[i]*c[i];
cc+=c[i];

}
System.out.println("average:"+(float)sum/cc);






}

}

B9933043 提到...

public class A1 {


public static void main(String[] args) {

int[]t={94,77,88,90,95,78,65,73,65,73,91,82,90,81};
int[]c={0,2,2,2,0,3,3,3,3,3,0,0};
int sum=0,cc=0;

for(int i=0;i<11;i++)
{
sum+=t[i]*c[i];
cc+=c[i];

}


System.out.println("average:"+(float)sum/cc);




}

}

B9933045 提到...

public class text1
{

public static void main(String[] args)
{

int a[]={82,45,68,61,70,97,60,80,79,63,85,67};
int c[]={ 0, 2, 2, 2, 0, 3, 3, 3, 3, 3, 0, 0};
float avg;
int cc=0;
int sum=0;
for (int i=0;i<a.length;i++)
{
sum+=a[i]*c[i];
cc+=c[i];
}
avg=(float)sum/cc;
System.out.println("加權平均="+avg);
System.out.println("總學分="+cc);

}

}

B9933026 提到...

package pack1;

public class A1 {

public static void main(String[] args) {
// TODO Auto-generated method stub

int t [] = {70,72,60,60,80,40,42,60,66,80,81,61};
int c [] = {0,2,2,2,0,3,3,3,3,3,0,0};
int sum = 0,cc = 0;
for (int i=0 ; i<t.length;i++)
{
sum+=t[i]*c[i];
cc+=c[i];
}

System.out.println("加權平均"+(float)sum/cc);


}

}

b9911126 提到...

public class b9911126 {

public static void main(String[] args) {
int t[]={82,60,75,50,60,51,60,60,50,65,46,85,66};
int c[]={0,3,1,3,4,3,2,1,2,2,2,0,0};
int sum=0,cc=0;
int i,avg;
for ( i=0;i<13;i++)
{sum+=t[i]*c[i];
cc+=c[i];
}
avg=sum/cc;
System.out.println("Sum"+sum);
System.out.println("cc:"+cc);
System.out.println("Avg:"+avg);
}

}

B9933041 提到...

package P1;

public class B1 {

public static void main(String[] args) {

int[]t={77,65,76,67,60,88,80,69};
int[]c={ 2, 2, 2, 3, 3, 3, 3, 3};
int sum=0,cc=0;
for(int i=0;i<t.length;i++)
{
sum+=t[i]*c[i];
cc+=c[i];
}
System.out.println("sum="+sum);
System.out.println("Average="+(double)sum/cc);
}
}

b9933011 提到...

public class b9933011 {


public static void main(String[] args) {
int[]t={78,78,72,72,60,72,80,46};
int[]c={ 2, 2, 2, 3, 3, 3, 3, 3};
int sum=0,cc=0;
for(int i=0;i<t.length;i++)
{
sum+=t[i]*c[i];
cc+=c[i];
}
System.out.println("sum="+sum);
System.out.println("Average="+(double)sum/cc);
}

}

b9933005豐智偉 提到...

package P1;

public class A {

public static void main(String[] args) {

int[] x = {83,79,76,78,85,92,69,71,72,81,85,82};
int[] y = {0,2,2,2,0,3,3,3,3,3,0,0};

int sum =0 ,yy = 0;
float average ;

for(int i=0; i<11; i++)
{
sum+=x[i]*y[i];
yy+=y[i];

}

average =(float) sum/yy;


System.out.print("average "+ average);
}

}

B9933052 提到...

package P1;

public class B9933052A {


public static void main(String[] args) {
int[] t={73,85,70,85,65,70,90,81};
int[] c={2, 2 ,2 ,3 ,3 ,3 ,3 ,3};
int sum=0,cc=0;
double average;
for(int i=0;i<t.length;i++)
{
sum+=t[i]*c[i];
cc+=c[i];

}
average=(double)sum/cc;
System.out.println("Sum= "+sum);
System.out.println("average="+average);
}

}

B9933010 提到...

package pack1;

public class B1 {

/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub

int t[]={79,71,60,65,70,62,60,55,84,69,88,70};
int c[]={0,2,2,2,0,3,3,3,3,3,0,0};

int sum=0,cc=0;
for(int i=0;i<t.length;i++)
{
sum+=t[i]*c[i];
cc+=c[i];
}
System.out.println("加權平均"+(float)sum/cc);
}

}

B9933023 提到...

package P1;
public class B9933023 {
public static void main(String[] args) {
int t[]={79,71,68,72,80,50,45,68,83,76,72,64};
int c[]={0,2,2,2,0,3,3,3,3,0,0};
int sum=0,cc=0;
float average;
for(int i=0;i<10;i++)
{
sum+=t[i]*c[i];
cc+=c[i];
}
average=(float)sum/cc;
System.out.println("average="+average);
}
}

b9933021 提到...

public class B9933021
{
public static void main(String[] args)
{

int[] t={81,81,76,75,95,94,64,84,89,88,88,73};
int[] c={0,2,2,2,0,3,3,3,3,3,0,0};

int sum=0,cc=0;
for(int i=0; i<11; i++)
{
sum+=t[i]*c[i];
cc+=c[i];
}

System.out.println("average:"+(float)sum/cc);

}
}

b9933039 提到...

public class b11111{

public static void main(String[] args) {

int t[]={81,71,75,76,74,78,96,81,91,73,79};
int c[]={2,2,2,0,3,3,3,3,3,0,0};
int sum=0,cc=0;
double average;
for(int i=0;i<10;i++)
{
sum+=t[i]*c[i];
cc+=c[i];

}
average=(double)sum/cc;
System.out.println("average="+average);
}

}

B9933003 提到...

package pack;

public class pcak {

public static void main(String[] args) {


int t[]={82,79,74,60,76,82,64,62,53,63,65,73};
int c[]={0,2,2,2,0,3,3,3,3,3,0,0};
int sum=0,cc=0;
float average;
for (int i=0;i<10;i++)

{
sum+=t[i]*c[i];
cc+=c[i];
}
average=(float)sum/cc;
System.out.println("average="+average);



}

}

B9933057 提到...

int t[]={81,69,87,69,80,99,71,72,92,74,71,73};
int c[]={0,2,2,2,0,3,3,3,3,3,0,0};
int sum=0,cc=0;
for(int i=0;i<11;i++)
{
sum+=t[i]*c[i];
cc+=c[i];
}
System.out.println("avg:"+(float)sum/cc);

b9933028 提到...

package B1;
public class P1 {
public static void main(String[] args) {

int[] t={81,77,86,97,85,87,69,80,90,68,94,78};
int[] c={0,2,2,2,0,3,3,3,3,3,0,0};

int sum=0,cc=0;
for(int i=0;i<11;i++)
{
sum+=t[i]*c[i];
cc+=c[i];
}

System.out.println("Average:"+(float)sum/cc);


}

}

B9933008 提到...

package A1;

public class a1 {

public static void main(String[] args) {

int[] t={86,82,90,79,85,93,60,79,78,81,91,77};
int[] c={0,2,2,2,0,3,3,3,3,3,0,0};

int sum=0,cc=0;

for (int i=0;i<11;i++)
{
sum+=(t[i]*c[i]);
cc+=c[i];
}

System.out.println("Average:"+(float)sum/cc);
}

}

B9733200 提到...

namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
int[] t = { 78, 33, 60, 88, 61, 58, 12 };
int[] c = { 3, 3, 3, 1, 3, 2, 2 };
int sum = 0, cc = 0;
double average;
for (int i = 0; i < 7; i++)
{
sum += t[i] * c[i];
cc += c[i];
}
average = (double)sum / cc;
Console.WriteLine("sum:" + sum);
Console.WriteLine("cc:" + cc);
Console.WriteLine("average:" + average);
Console.ReadLine();

}
}
}

B9733100 提到...

namespace b9733100
{
class Program
{
static void Main(string[] args)
{
int[] t {78,93,47,79,88,83,74,72,92};
int[] c = { 3, 1, 3, 3, 3, 2, 2, 3, 3 };
int sum = 0, cc = 0;
double average;
for (int i = 0; i < 9; i++)
{
sum += t[i] * c[i];
cc += c[i];
}
average = (double)sum / cc;
Console.WriteLine("sum:" + sum);
Console.WriteLine("cc:" + cc);
Console.WriteLine("average:" + average);
Console.ReadLine();

}
}
}

b9933034 提到...

public class b11111{

public static void main(String[] args) {

int t[]={80,97,82,91,85,70,78,72,73,77,84};
int c[]={2,2,2,0,3,3,3,3,3,0,0};
int sum=0,cc=0;
double average;
for(int i=0;i<10;i++)
{
sum+=t[i]*c[i];
cc+=c[i];

}
average=(double)sum/cc;
System.out.println("average="+average);
}

}

B9733099 提到...

namespace B9733099
{
class Program
{
static void Main(string[] args)
{
int[] t = { 60, 77, 93, 60, 81, 74, 63, 77, 71, 78 };
int[] c = { 3, 3, 1, 3, 3, 3, 0, 2, 2, 3 };
int sum = 0, cc = 0;
double average;
for (int i = 0; i < 10; i++)
{
sum += t[i] * c[i];
cc += c[i];
}
average = (double)sum / cc;
Console.WriteLine("Sum" + sum);
Console.WriteLine("cc:" + cc);
Console.WriteLine("average." + average);
Console.ReadLine();

}
}
}

B9933044 提到...

package PPP1;

public class ggggggidjgidjg {

public static void main(String[] args) {

float average;
int t[]={87,86,71,83,91,97,70,81,67,76,82,70};
int c[]={0,2,2,2,0,3,3,3,3,3,0,0};
int sum=0,cc=0;


for(int i=0;i<t.length;i++)
{
sum+=t[i]*c[i];
cc+=c[i];
}
average=(float)sum/cc;
System.out.println("平均="+average);

}

}

B9933048 提到...

package sum;
class sum{
public static void main(String[]args){

int sum = 0;
int a[] = {77,35,63,72,80,80,68,89,85,60,81,72};
int d[] = {0,2,2,2,0,3,3,3,3,3,0,0};

for(int b = 0;b<a.length;b++)
System.out.println(a[b]*d[b]);

for(int b = 0;b<a.length;b++)
sum+=a[b]*d[b];
System.out.println("991下學期加總 = "+sum);
System.out.println("991下學期平均 = "+(float)sum/21);

}
}

b9933018 提到...

public class b11111{

public static void main(String[] args) {

int t[]={82,68,73,81,78,72,71,64,70,72,80};
int c[]={2,2,2,0,3,3,3,3,3,0,0};
int sum=0,cc=0;
double average;
for(int i=0;i<10;i++)
{
sum+=t[i]*c[i];
cc+=c[i];

}
average=(double)sum/cc;
System.out.println("average="+average);
}

}

B9933007 提到...

package A2;
public class A2 {

public static void main(String[] args) {
int t[]={82,71,61,72,85,75,26,64,87,67,91,80};
int c[]={0,2,2,2,0,3,3,3,3,3,0,0};
int sum=0,cc=0;
double avg;
for (int i=0; i<10; i++)
{
sum+=t[i]*c[i];
cc+=c[i];
}
avg=(double)sum/cc;
System.out.println("avg="+avg);
}

}

B9933046 提到...

package pack2;

public class B2 {

public static void main(String[] args) {

int t[]={68,74,77,69,80,71,60,66,82,66,80,60};
int c[]={0,2,2,2,0,3,3,3,3,3,0,0};
int sum=0,cc=0;
for(int i=0;i<11;i++)
{
sum+=t[i]*c[i];
cc+=c[i];
}

System.out.println("average:"+(float)sum/cc);

}

}

B9933015 提到...

int t[]={82,75,76,86,85,95,75,83,88,91,93,87};
int c[]={0,2,2,2,0,3,3,3,3,3,0,0};
int avg=0,cc=0;

for(int i=0;i<11;i++)
{
avg+=t[i]*c[i];
cc+=c[i];
}
System.out.println("avg:"+(float)avg/cc);

B9933017 提到...

package p1;

public class A1 {


public static void main(String[] args) {
int t[]={82,68,91,78,95,78,38,60,66,71,76,64};
int c[]={0,2,2,2,0,3,3,3,3,3,0,0};
int sum=0,cc=0;
for(int i=0;i<t.length;i++)
{
sum+=t[i]*c[i];
cc+=c[i];

}
System.out.println("加權平均"+(float)sum/cc);

}

}

B9933055 提到...

public class BB0a {

/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
int t[]={99,84,83,60,95,90,72,69,75,78,75,71};
int c[]={0,2,2,2,0,3,3,3,3,3,0,0};
int sum=0,cc =0;
for(int i=0;i<t.length;i++)
{




sum+=t[i]*c[i];
cc+=c[i];

}
System.out.println("加權平均="+(float)sum/cc);

}
}

B9933004 提到...

package P1;

public class B1 {

public static void main(String[] args) {

int t[]={79,80,94,75,80,92,74,88,89,72,85,70};
int c[]={0,2,2,2,0,3,3,3,3,3,0,0};
int sum=0,cc=0;
for(int i=0;i<11;i++)
{
sum+=t[i]*c[i];
cc+=c[i];
}
System.out.println("average:"+(float)sum/cc);
}

}

B9933051 提到...

public class B1
{


public static void main(String[] args)
{
int t[]={81,77,80,85,95,93,79,68,84,74,82,79};
int c[]={0,2,2,2,0,3,3,3,3,3,0,0};

int sum=0,cc=0;
double average;

for(int i=0; i<t.length; i++)
System.out.println(t[i]*c[i]);


for(int i=0; i<t.length; i++)
{
sum+=t[i]*c[i];
cc+=c[i];
}

average =(double) sum / cc;
System.out.println("Sum="+sum);
System.out.println("Average="+average);

}

}

B9933049 提到...

int t[]={81,77,80,71,80,90,78,76,92,77,84,77};
int c[]={0,2,2,2,0,3,3,3,3,3,0,0};
int sum=0,cc=0;
for(int i=0;i<11;i++)
{
sum+=t[i]*c[i];
cc+=c[i];
}
System.out.println("avg:"+(float)sum/cc);

B9933020 提到...

public class A2 {

/**
* @param args
*/
public static void main(String[] args)

{

// TODO Auto-generated method stub
int t[] = {78, 80 , 79, 82, 70, 90, 71, 73, 80, 73, 88, 70};
int c[] = {0,2,2,2,0,3,3,3,3,3,0,0};
int sum=0 , cc=0 ;
for ( int i=0 ; i<t.length ; i++ )
{

sum+=t[i]*c[i];
cc+=c[i];

}

System.out.println("加權平均"+(float)sum/cc);


}

}

b9733114 提到...

public static void main(String[] args) {
int t1,t2,t3,t4,t5; // 各次的成績
int t6,t7,t8,t9,t10;
int sum; // 總分
float average; // 平均
t1 = 78; t2 = 60; t3 = 70; t4 =93; t5 =60;
t6 = 83; t7 = 84; t8 = 74; t9 = 79; t10 = 87;
sum = t1 + t2 + t3 + t4 + t5 +
t6 + t7 + t8 + t9 + t10; // 計算總分
average = sum / 10; // 計算平均
System.out.println("總分: "+sum); // 顯示總分
System.out.println("平均: "+average);// 顯示平均

匿名 提到...

public class b9733115 {
public static void main(String[] args) {
int t1,t2,t3,t4,t5; // 各次的成績
int t6,t7,t8,t9,t10;
int sum; // 總分
float average; // 平均
t1 = 66; t2 = 40; t3 = 68; t4 = 70; t5 = 65;
t6 = 70; t7 = 60; t8 = 72; t9 = 76; t10 = 74;
sum = t1 + t2 + t3 + t4 + t5 +
t6 + t7 + t8 + t9 + t10; // 計算總分
average = sum / 10; // 計算平均
System.out.println("總分: "+sum); // 顯示總分
System.out.println("平均: "+average);// 顯示平均
}
}

B9933014 提到...

public class c1 {

public static void main(String[] args) {

int t[]={75,76,60,70,79,75,67,68,65,85,75};
int c[]={2,2,2,0,3,3,3,3,3,0,0};
int sum=0,cc=0;
for(int i=0;i<11;i++)
{
sum+=t[i]*c[i];
cc+=c[i];
}
System.out.println("avg:"+(float)sum/cc);

}

}

b9733115 提到...

public class b9733115 {
public static void main(String[] args) {
int t1,t2,t3,t4,t5; // 各次的成績
int t6,t7,t8,t9,t10;
int sum; // 總分
float average; // 平均
t1 = 66; t2 = 40; t3 = 68; t4 = 70; t5 = 65;
t6 = 70; t7 = 60; t8 = 72; t9 = 76; t10 = 74;
sum = t1 + t2 + t3 + t4 + t5 +
t6 + t7 + t8 + t9 + t10; // 計算總分
average = sum / 10; // 計算平均
System.out.println("總分: "+sum); // 顯示總分
System.out.println("平均: "+average);// 顯示平均
}
}

B9933006 提到...

package pack1;

public class Ex2
{

public static void main(String[] args)
{
int t[]={85, 85, 85, 92, 95, 91, 73, 99, 87, 92, 92, 69};
int c[]={ 0, 2, 2, 2, 0, 3, 3, 3, 3, 3, 0, 0};

int sum=0;
int sumC=00;
double average;

for(int i=0; i<12; i++)
{
sum+=t[i]*c[i];
sumC+=c[i];
}

average=(double)sum/sumC;
System.out.println("學期加權總成績="+sum);
System.out.println("學期加權平均="+average);

}
}

B9933036 提到...

package p1;

public class t1 {

public static void main(String[] args) {

int t[]={81,94,81,85,75,75,78,94,92,88,81};
int c[]={2,2,2,0,3,3,3,3,3,0,0};
int sum=0,cc=0;
double average;
for(int i=0;i<10;i++)
{
sum+=t[i]*c[i];
cc+=c[i];

}
average=(double)sum/cc;
System.out.println("average="+average);
}

}

B9933031 提到...

public class pack1 {

/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
// int s[] = new int[3];
// int c[] = new int[3];
int s[]={85,88,90,80,84,95,85,83,82,84};
int c[]={0,2,2,2,3,3,3,3,2,1};
float sum=0;
float cc=0;
float avarage;
for (int i=0;i<=2;i++)
{
sum+=s[i]*c[i];
cc+=c[i];

}
System.out.println(sum);
System.out.println(cc);
avarage=(float)(sum/cc);
System.out.println(avarage);
}

}

B9733088 提到...

public class ava {

public static void main(String[] args) {
// TODO Auto-generated method stub
int t[]={69,65,54,75,74,84,84,74,66,72};
int c[]={3,1,3,3,0,2,2,3,3,3};
int sum=0,cc=0;
float average;
for(int i=0;i<10;i++)
{
sum+=t[i]*c[i];
cc+=c[i];
}
average =(float) sum/cc;
System.out.println("sum:"+sum);
System.out.println("cc:"+cc);
System.out.println("average:"+average);

}

}

Related Posts Plugin for WordPress, Blogger...

熱門文章