单选题In the correctly worked out addition example below, what is the greatest possible value of digit B?A9B8C6D5E4
单选题
In the correctly worked out addition example below, what is the greatest possible value of digit B?
A
9
B
8
C
6
D
5
E
4
参考解析
解析:
Since 2 is carried over from adding the digits in the first column, in the second column A+B+B+1= 14, so A+2B= 13. Since B must be an integer, A cannot be 0. Hence, the greatest possible value of digit B occurs when A = 1 and B = 6.
Since 2 is carried over from adding the digits in the first column, in the second column A+B+B+1= 14, so A+2B= 13. Since B must be an integer, A cannot be 0. Hence, the greatest possible value of digit B occurs when A = 1 and B = 6.
相关考题:
1. public class X implements Runnable( 2. private int x; 3. private int y; 4. 5. public static void main(String[]args) 6. X that = new X(); 7. (new Thread(that)).start(); 8. (new Thread(that)).start(); 9. ) 10. 11. public void run() ( 12. for (;;) ( 13. x++; 14. y++; 15. System.out.printIn(“x=” + x + “, y = ” + y); 16. ) 17. ) What is the result?()A、 Errors at lines 7 and 8 cause compilation to fail.B、 The program prints pairs of values for x and y that might not always be the same on the same line (for example, “x=2, y=1”).C、 The program prints pairs of values for x and y that are always the same on the same line (for example, “x=1, y=1”. In addition, each value appears twice (for example, “x=1, y=1” followed by “x=1, y=1”).D、 The program prints pairs of values for x and y that are always the same on the same line (for example, “x=1, y=1”. In addition, each value appears only for once (for example, “x=1, y=1” followed by “x=2, y=2”).
public class X implements Runnable { private int x; private int y; public static void main(String [] args) { X that = new X(); (new Thread( that )).start(); (new Thread( that )).start(); } public void run() { for (;;) { synchronized (this) { x++; y++; } System.out.println(Thread.currentThread().getName() + “x = “ + x + “, y = “ + y); } } } What is the result?() A、 Compilation fails.B、 The program prints pairs of values for x and y that might not always be the same on the same line (for example, “x = 2, y = 1”).C、 The program prints pairs of values for x and y that are always the same on the same line (for example, “x = 1, y = 1”). In addition, each value appears only once (for example, “x = 1, y = 1” followed by “x = 2, y = 2”). The thread name at the start of the line shows that both threads are executing concurrently.D、 The program prints pairs of values for x and y that are always the same on the same line (for example, “x = 1, y = 1”). In addition, each value appears only once (for example, “x = 1, y = 1” followed by “x = 2, y = 2”). The thread name at the start of the line shows that only a single thread is actually executing.
public class X implements Runnable ( private int x; private int y; public static void main(String args) ( X that = new X(); (new Thread(that)) . start( ); (new Thread(that)) . start( ); ) public synchronized void run( ) ( for (;;) ( x++; y++; System.out.printIn(“x = “ + x + “, y = “ + y); ) ) ) What is the result?()A、 An error at line 11 causes compilation to fail.B、 Errors at lines 7 and 8 cause compilation to fail.C、 The program prints pairs of values for x and y that might not always be the same on the same line (for example, “x=2, y=1”)D、 The program prints pairs of values for x and y that are always the same on the same line (forexample, “x=1, y=1”. In addition, each value appears twice (for example, “x=1, y=1” followed by “x=1, y=1”)E、 The program prints pairs of values for x and y that are always the same on the same line (for example, “x=1, y=1”. In addition, each value appears twice (for example, “x=1, y=1” followed by “x=2s, y=2”)
public class X implements Runnable( private int x; private int y; public static void main(Stringargs) X that = new X(); (new Thread(that)).start(); (new Thread(that)).start(); ) public void run() ( for (;;) ( x++; y++; System.out.printIn(“x=” + x + “, y = ” + y); ) ) What is the result?() A、 Errors at lines 7 and 8 cause compilation to fail.B、 The program prints pairs of values for x and y that might not always be the same on the same line (for example, “x=2, y=1”).C、 The program prints pairs of values for x and y that are always the same on the same line (for example, “x=1, y=1”. In addition, each value appears twice (for example, “x=1, y=1” followed by “x=1, y=1”).D、 The program prints pairs of values for x and y that are always the same on the same line (for example, “x=1, y=1”. In addition, each value appears only for once (for example, “x=1, y=1” followed by “x=2, y=2”).
public class X implements Runnable ( private int x; private int y; public static void main(String [] args) ( X that = new X(); (new Thread(that)) . start( ); (new Thread(that)) . start( ); ) public synchronized void run( ) ( for (;;) ( x++; y++; System.out.printIn(“x = “ + x + “, y = “ + y); ) ) ) What is the result?() A、 An error at line 11 causes compilation to fail.B、 Errors at lines 7 and 8 cause compilation to fail.C、 The program prints pairs of values for x and y that might not always be the same on the same line (for example, “x=2, y=1”)D、 The program prints pairs of values for x and y that are always the same on the same line (for example, “x=1, y=1”. In addition, each value appears twice (for example, “x=1, y=1” followed by “x=1, y=1”)E、 The program prints pairs of values for x and y that are always the same on the same line (for example, “x=1, y=1”. In addition, each value appears twice (for example, “x=1, y=1” followed by “x=2s, y=2”)
public class Foo { public int a; public Foo() { a = 3; } public void addFive() { a += 5; } } and: public class Bar extends Foo { public int a; public Bar() { a = 8; } public void addFive() { this.a +=5; } } invoked with: Foo foo = new Bar(); foo.addFive(); System.out.println(”Value: “+ foo.a); What is the result?() A、 Value: 3B、 Value: 8C、 Value: 13D、 Compilation fails.E、 The code runs with no output.F、 An exception is thrown at runtime.
问答题If 4 percent of (p + q) is 8 and p is a positive integer, what is the greatest possible value of q ?
单选题public class Foo { public int a; public Foo() { a = 3; } public void addFive() { a += 5; } } and: public class Bar extends Foo { public int a; public Bar() { a = 8; } public void addFive() { this.a +=5; } } invoked with: Foo foo = new Bar(); foo.addFive(); System.out.println(”Value: “+ foo.a); What is the result?()A Value: 3B Value: 8C Value: 13D Compilation fails.E The code runs with no output.F An exception is thrown at runtime.
单选题1, 2, 6, 7, 9A three-digit integer is to be formed from the digits listed above. If the first digit must be odd, either the second or the third digit must be 2, and no digit may be repeated, how many such integers are possible?A6B9C18D24E30
单选题public class X implements Runnable { private int x; private int y; public static void main(String [] args) { X that = new X(); (new Thread( that )).start(); (new Thread( that )).start(); } public void run() { for (;;) { synchronized (this) { x++; y++; } System.out.println(Thread.currentThread().getName() + “x = “ + x + “, y = “ + y); } } } What is the result?()A Compilation fails.B The program prints pairs of values for x and y that might not always be the same on the same line (for example, “x = 2, y = 1”).C The program prints pairs of values for x and y that are always the same on the same line (for example, “x = 1, y = 1”). In addition, each value appears only once (for example, “x = 1, y = 1” followed by “x = 2, y = 2”). The thread name at the start of the line shows that both threads are executing concurrently.D The program prints pairs of values for x and y that are always the same on the same line (for example, “x = 1, y = 1”). In addition, each value appears only once (for example, “x = 1, y = 1” followed by “x = 2, y = 2”). The thread name at the start of the line shows that only a single thread is actually executing.
单选题If x is an integer and y=7x+11, what is the greatest value of x for which Y is less than 50?A7B6C5D4E3
填空题If a and b are distinct integers such that ab1 and b≠0, what is the greatest possible value of a/b?____
单选题The greatest value of the program is that each visiting student _____.Ahas a chance to travel in foreign countriesBshares what he learned with othersClearns a new languageDgains a new understanding of world problems
单选题1. public class X implements Runnable( 2. private int x; 3. private int y; 4. 5. public static void main(String[]args) 6. X that = new X(); 7. (new Thread(that)).start(); 8. (new Thread(that)).start(); 9. ) 10. 11. public void run() ( 12. for (;;) ( 13. x++; 14. y++; 15. System.out.printIn(“x=” + x + “, y = ” + y); 16. ) 17. ) What is the result?()A Errors at lines 7 and 8 cause compilation to fail.B The program prints pairs of values for x and y that might not always be the same on the same line (for example, “x=2, y=1”).C The program prints pairs of values for x and y that are always the same on the same line (for example, “x=1, y=1”. In addition, each value appears twice (for example, “x=1, y=1” followed by “x=1, y=1”).D The program prints pairs of values for x and y that are always the same on the same line (for example, “x=1, y=1”. In addition, each value appears only for once (for example, “x=1, y=1” followed by “x=2, y=2”).
单选题public class X implements Runnable( private int x; private int y; public static void main(Stringargs) X that = new X(); (new Thread(that)).start(); (new Thread(that)).start(); ) public void run() ( for (;;) ( x++; y++; System.out.printIn(“x=” + x + “, y = ” + y); ) ) What is the result?()A Errors at lines 7 and 8 cause compilation to fail.B The program prints pairs of values for x and y that might not always be the same on the same line (for example, “x=2, y=1”).C The program prints pairs of values for x and y that are always the same on the same line (for example, “x=1, y=1”. In addition, each value appears twice (for example, “x=1, y=1” followed by “x=1, y=1”).D The program prints pairs of values for x and y that are always the same on the same line (for example, “x=1, y=1”. In addition, each value appears only for once (for example, “x=1, y=1” followed by “x=2, y=2”).
单选题public class X implements Runnable ( private int x; private int y; public static void main(String args) ( X that = new X(); (new Thread(that)) . start( ); (new Thread(that)) . start( ); ) public synchronized void run( ) ( for (;;) ( x++; y++; System.out.printIn(“x = “ + x + “, y = “ + y); ) ) ) What is the result?()A An error at line 11 causes compilation to fail.B Errors at lines 7 and 8 cause compilation to fail.C The program prints pairs of values for x and y that might not always be the same on the same line (for example, “x=2, y=1”)D The program prints pairs of values for x and y that are always the same on the same line (forexample, “x=1, y=1”. In addition, each value appears twice (for example, “x=1, y=1” followed by “x=1, y=1”)E The program prints pairs of values for x and y that are always the same on the same line (for example, “x=1, y=1”. In addition, each value appears twice (for example, “x=1, y=1” followed by “x=2s, y=2”)
单选题public class X implements Runnable ( private int x; private int y; public static void main(String [] args) ( X that = new X(); (new Thread(that)) . start( ); (new Thread(that)) . start( ); ) public synchronized void run( ) ( for (;;) ( x++; y++; System.out.printIn(“x = “ + x + “, y = “ + y); ) ) ) What is the result?()A An error at line 11 causes compilation to fail.B Errors at lines 7 and 8 cause compilation to fail.C The program prints pairs of values for x and y that might not always be the same on the same line (for example, “x=2, y=1”)D The program prints pairs of values for x and y that are always the same on the same line (for example, “x=1, y=1”. In addition, each value appears twice (for example, “x=1, y=1” followed by “x=1, y=1”)E The program prints pairs of values for x and y that are always the same on the same line (for example, “x=1, y=1”. In addition, each value appears twice (for example, “x=1, y=1” followed by “x=2s, y=2”)
填空题If t is a positive integer, and 18t is the cube of an integer, then what is the least possible value of t ?____
单选题If a and b are positive integers such that (a-4)(b-5) = 0, what is the least possible value of a + b?A5B6C8D10E11