public class CetScoreChange
{
public static void main(String[] args)
{
int[] score = {129, 245, 167, 54};
int[] origiScore;
float[] percentage= {0.2, 0.4, 0.25, 0.15};
float origiScoreTotal= 0;
int i;
int total=0;
String[] subject = {"Listening", "Reading", "Synthesis", "Composition"};
System.out.println ("The total score of each part is 71...");
for ( i=0; i< score.length; i++)
{
System.out.println(subject[i]);
System.out.println(score[i]);
total =total + score[i];
}
System.out.println("Your total score is " + total );
System.out.println("Now, the originalitily score is")
for ( i=0; i< score.length; i++)
{
System.out.println(subject[i]);
origiScore[i]= (score[i] / percentage[i])/ 10;
origiScoreTotal= origiScoreTotal + origiScore[i];
System.out.println(origiScore[i]);
}
System.out.println("Your CET4 socre have been changed to 100 percentage is" + origiScoreTotal );
}
}
//';' expected..
{
public static void main(String[] args)
{
int[] score = {129, 245, 167, 54};
int[] origiScore;
float[] percentage= {0.2, 0.4, 0.25, 0.15};
float origiScoreTotal= 0;
int i;
int total=0;
String[] subject = {"Listening", "Reading", "Synthesis", "Composition"};
System.out.println ("The total score of each part is 71...");
for ( i=0; i< score.length; i++)
{
System.out.println(subject[i]);
System.out.println(score[i]);
total =total + score[i];
}
System.out.println("Your total score is " + total );
System.out.println("Now, the originalitily score is")
for ( i=0; i< score.length; i++)
{
System.out.println(subject[i]);
origiScore[i]= (score[i] / percentage[i])/ 10;
origiScoreTotal= origiScoreTotal + origiScore[i];
System.out.println(origiScore[i]);
}
System.out.println("Your CET4 socre have been changed to 100 percentage is" + origiScoreTotal );
}
}
//';' expected..
解决方案 »
- Process对象如何判断该进程已经结束?
- java调用数据库信息的问题
- 我通过odbc数据源连接sql server2000 求救!!
- 使用ant时如何在jdk1.6下使用jdk1.4
- 为什么标签类添加了事件后要定义为final类?
- 关于java的内存模型!
- 高手请进:关于抽象类的继承
- 我用java调用*.dll的时候为什么结果没出来呢,高手你们看看啊,急急急急!!!!!!!!
- 关于在一个实体bean中引用另一个实体bean的一点困惑?解决后立即给分(150分)
- java中 .class成员变量的问题
- Runnable.run()是不是等效Thread.start()开启一个真正的线程运行?
- Java中如何取得JNI函数参数为jobject类型的直
{
public static void main(String[] args)
{
int[] score = {129, 245, 167, 54};
int[] origiScore ;
float[] percentage= {0.2f, 0.4f, 0.25f, 0.15f};
float origiScoreTotal= 0;
int i;
int total=0;
String[] subject = {"Listening", "Reading", "Synthesis", "Composition"};
System.out.println ("The total score of each part is 71...");
for ( i=0; i< score.length; i++)
{
System.out.println(subject[i]);
System.out.println(score[i]);
total =total + score[i];
}
System.out.println("Your total score is " + total );
System.out.println("Now, the originalitily score is");
origiScore = new int[score.length];
for ( i=0; i< score.length; i++)
{
System.out.println(subject[i]);
origiScore[i]= (int)(score[i] / percentage[i])/ 10;
origiScoreTotal= origiScoreTotal + origiScore[i];
System.out.println(origiScore[i]);
}
System.out.println("Your CET4 socre have been changed to 100 percentage is" + origiScoreTotal );
}
}
origiScore = new int[score.length]; 数组分配空间
d加起来是710?