I believe team work important.
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);
}
}
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);
}
}
— I wonder whether I could accept this discount or not.
—
I’ve learned today.
A.vital B.silent C.collide D.fierce
—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.
— ?
— I have worked for IBM for 3 years.
— I believed Ted only from his resume. In fact he is not qualified for his job.
—
I believe team work important.
下面程序的输出结果是:
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);}}
— Could you give me an example of good team working there?
—
I’m particularly proud of I organized the finances.
— I believed Ted only from his resume. In fact he is not qualified for his job.
—
I believe team work important.
—Though I have been drinking, I can drive home safely.
—No, I will be the driver.
—I’m terribly sorry that I’ve spilled some coffee on the table.
— _________________.
— 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.
— Did the medicine make you feel better?
— No. The more , I feel.
The work was done her instructions.
I like the working atmosphere here.It's very .
—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.
The manager asked me I could finish my work before the weekend.
Tom is________ than any other players in the school team.
— Let's go to a movie after work, OK?
—
— 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);
}
}
免费的网站请分享给朋友吧