At university I never my assignments in late.
public class XXK4 {
public static void main(String[] args) {
int [][]a={{2,5,8},{3,6,9},{4,5,6}};
int []b=new int[3];
int i,j;
for(i=0; i<a.length; i++)
for(j=0; j<a[i].length; j++)
b[i]+=a[i][j];
for(i=0; i<b.length; i++)
System.out.print(b[i]+" ");
}
}
class ABC {
int a,b;
public ABC(int a, int b) {this.a=a; this.b=b;}
public int compareTo(ABC x) {return a*b-x.a*x.b;}
}
public class XXK5 {
public static void main(String[] args) {
int [][]d={{3,8},{4,6},{5,6},{2,9},{6,7},{5,8}};
ABC []ar=new ABC[d.length];
int i,k=0;
for(i=0; i<ar.length; i++)
ar[i]=new ABC(d[i][0],d[i][1]);
for(i=1; i<ar.length; i++)
if(ar[i].compareTo(ar[k])>0) k=i;
System.out.println("k="+k);
}
}
class ABC {
String name;
double price;
public ABC(String na, double pr) {name=na; price=pr;}
public int compareTo(ABC x) {
if(name.compareTo(x.name)>0) return 1;
if(name.compareTo(x.name)<0) return -1;
else return 0;
}
}
public class XXK5 {
public static void main(String[] args) {
String []s={"apple", "pear", "tangerme", "banana", "grape"};
double []d={3.8, 2.5, 3.2, 4.3, 5.2};
ABC []ar=new ABC[s.length];
int i,k=0;
for(i=0; i<ar.length; i++)
ar[i]=new ABC(s[i],d[i]);
for(i=1; i<ar.length; i++)
if(ar[i].compareTo(ar[k])>0) k=i;
System.out.println(ar[k].name+" "+ar[k].price);
}
}
—Hi, Lily, what’s up with Mike? I heard the boss yelling at Mike earlier today.
—
— I wonder whether I could accept this discount or not.
—
—
— It will take at least three weeks.
At university I never my assignments in late.
I’ve learned today.
A.vital B.silent C.collide D.fierce
—
— It's lovely. I have never been to such beautiful place like that.
—I’m terribly sorry that I’ve spilled some coffee on the table.
— _________________.
—Can you go skating with us this afternoon?
—Sorry, I can’t. I ________ take care of my little sister at home.
下面程序的输出结果是:
public class Test{
void printValue(int m){
do { System .out .println(“The value is”+m);}
while(- - m>10);
}
public static void main(String arg[]){
int i=10;
Test t= new Test();
t.printValue(i);}}
I’m particularly proud of I organized the finances.
—Though I have been drinking, I can drive home safely.
—No, I will be the driver.
—I get at least half an hour of exercise almost every day.
— Oh great! _________________________.
– The advancement of technology has boosted the pace of our lives, and requires us to learn something new every day.
– I have chosen the online program at OU.
—I’m terribly sorry that I’ve spilled some coffee on the table.
— _________________.
— Do you mind if I record your lecture?
— _________________. Go ahead.
— Hi, Helen, I’ll have an interview tomorrow. I’m afraid I can’t make it.
—
—May I ask you why you left the former company?
—
— ?
— I have worked for IBM for 3 years.
—
— Neither do I. Look at our community, it is such a mess.
— Did the medicine make you feel better?
— No. The more , I feel.
—
— It's lovely. I have never been to such beautiful place like that.
— ?
—It will take at least two weeks.
—Can you go skating with us this afternoon?
—Sorry, I can’t. I ________ take care of my little sister at home.
—
— Thank you. I must say I have a great staff.
They should never try to pursue profit health and life of people.
— I'm sorry. I shouldn't have put the printer here.
— .
public class XXK4 {
public static void main(String[] args) {
int []a={2,5,8,10,15,20};
int s=0;
for(int i=0; i<a.length; i++) s+=a[i];
System.out.println("s="+s);
}
}
public class XXK4 {
public static void main(String[] args) {
String []a={"xxk","weirong","xucong","xuxiaohua","baojuan"};
int m=0;
for(int i=0; i<a.length; i++) {
int n=a[i].length();
if(n>m) m=n;
}
System.out.println("m="+m);
}
}
免费的网站请分享给朋友吧