【单选题】下面的程序代码输出的结果是多少( ) public class smallT { public static void main(String args[]) { smallT t = new smallT(); int b = t.get(); System.out.println(b); } public int get() { try { return...
【单选题】下面程序代码段的输出结果是 int a=15, b=10, c=20, d; d = a > 12 ? b : c; switch D. { case 5: printf("%d,", a); case 10: printf("%d,", b); case 20: printf("%d,", c); default: printf("#\n"); }
【单选题】下面程序代码的输出结果是()。 int num1=40; int num2=5; int ans=0; if ( num1/5==num2){ans=10;} if (num2%5==0) {ans=20;} if (num2==0){ans=30;} else {ans=40;} System.out.println("answer is :"+ans);