The school was moved out of downtown as the number of students had grown too_______.A.smallB.fewC.1argeD.many

题目

The school was moved out of downtown as the number of students had grown too_______.

A.small

B.few

C.1arge

D.many


相似考题

4.试题五(共15分)阅读以下说明和 C++代码,将应填入 (n) 处的语句或语句成分写在答题纸的对应栏内。【说明】某数据文件students.txt的内容为100名学生的学号和成绩,下面的程序将文件中的数据全部读入对象数组,按分数从高到低进行排序后选出排名前 30%的学生。【C++代码】#include <iostream>#include <fstream>#include <string>using namespace std;class Student {private:string sNO; //学号int credit; //分数public:Student(string a,int b) { sNO = a; credit = b;}Student(){}int getCredit();void out();};(1) ::getCredit() {return credit;}(2) ::out() {cout << "SNO: " << sNO << ", Credit=" << credit << endl;}class SortStudent {public:void sort(Student *s, int n);SortStudent(){}};void SortStudent::sort(Student *s,int n) {for(int i = 0; i < n-1; i++) {for(int j = i+1; j < n; j++) {if(s[i]. (3) < s[j]. (4) ) {Student temp = s[i]; s[i] = s[j]; s[j] = temp;}}}}int main(int argc, char* argv[]){const int number = 100; //学生总数ifstream students;students.open("students.txt");if(!students.is_open()) {throw 0;}Student *testStudent = (5) [number];int k = 0;string s;while (getline(students,s,'\n')) { //每次读取一个学生的学号和成绩Student student(s.substr(0,s.find(',')), atoi(s.substr(s.find(',')+1).c_str()));testStudent[k++] = student;}students.close();(6) ;ss.sort(testStudent,k);cout <<"top 30%: "<<endl;for(k = 0; k < number * 0.3; k++) {testStudent[k].out();}delete []testStudent;return 0;}

更多“The school was moved out of downtown as the number of students had grown too_______.A.s ”相关问题
  • 第1题:

    classNumber{publicstaticvoidmain(String[]args){try{System.out.print(Integer.parseInt("

    classNumber{publicstaticvoidmain(String[]args){try{System.out.print(Integer.parseInt("forty"));}catch(RuntimeExceptionr){System.out.print("runtime");}catch(NumberFormatExceptione){System.out.print("number");}}}结果是什么?()

    A.forty

    B.number

    C.runtime

    D.编译失败


    参考答案:D

  • 第2题:

    下列程序的运行结果是( )。 public class Sun { public static void main(String args[ ]) { int number,digits; number=53; if(number<10) digits=1; else if(number<100) digits=2; else digits=3; System.out.println(digits); } }

    A.1

    B.2

    C.3

    D.0


    正确答案:B
    解析:本题考查对if-else条件语句的理解。本题是if-else语句的嵌套,首先number=53,不满足number10,执行else部分,else部分是嵌套的if-else语句,满足number100,所以digits=2。故本题答案是B。

  • 第3题:

    下列程序的运行结果是( )。 public class Sun { public static void main(String args[ ]) { int number,digits; number=53; if(number<10) digits=1; else if(number<100) digits=2; else diglts=3; System.out.println(digits); } }

    A.1

    B.2

    C.3

    D.0


    正确答案:B
    解析:本题考查对if-else条件语句的理解。本题是if-else语句的嵌套,首先number=53,不满足number10,执行else部分,else部分是嵌会的if-else语句,满足number100,所以 digits=2。故本题答案是B。

  • 第4题:

    现有:classNumber{publicstaticvoidmain(String[]aras){try{System.out.print(Integer.parselnt("forty"));}catch(RuntimeExceptionr){System.out.print("runtime");}catch(NumberFormatExceptione){system..ut.print("number");}}}结果是什么?()

    A.number

    B.runtime

    C.fortynumber

    D.编译失败


    参考答案:D

  • 第5题:

    阅读下列Java程序和程序说明,将应填入(n)处的字句写在对应栏内。

    【说明】本程序实现功能:读入两个整数,第1个数除以第2个数,声明当除数为零时抛出异常类DivideByZeroException。

    public class DivideByZeroException (1) {

    public DivideByZeroException ( ) {

    super("Attcmpted to divide by zero");

    }

    }

    import java.io. *;

    public class Example {

    private static int quotient(int numerator, in)\”}t denominator) throws

    DivideByZeroException {

    if (denominator==0)

    throw (2);

    return(numerator / denominator);

    }

    public static void main(String args[]) {

    int number1=0, number2=0, result0;

    try{

    System.out.print1n("Enter the first number:");

    number1 = Integer. valueOf(Keyboard.getString()).intValue();

    System.out.print1n("Enter the second number:");

    number2 = Integer. Va1ueOf(Keyboard.getString()).intValue();

    result = quotient(number1,number2);

    }

    catch (NumberFormatException e) {

    System.out.print1n("Invalid integer entered!");

    System. exit(-1);

    }

    catch ((3)) {

    System.out.print1n(e.to String());

    System.exit(-1);

    }

    Systcm.out.pfint1n(number1 + "/" + number2 + "=" + result);

    }

    }

    其中, Keyboard类的声明为:

    import java.io.*;

    public class Keyboard{

    static BufferedReader inputStream =(4)

    (new InputStreamReader(System.in));

    public static int getInteger() {

    try(

    return (Intoger.valueOf(inputStream.readLine().trim()).intValue());

    } catch (Exception e) {

    e.printStackTrace();

    return 0;

    }

    }

    public static String getString() {

    try{

    return (inputStream.readLine());

    } catch ((5))

    { return "0";}

    }

    }


    正确答案:(1)extends ArithmeticException (2)new DivideByZeroExeeption() (3)DivideByZeroException e (4)new BufferedReader (5)IOException e
    (1)extends ArithmeticException (2)new DivideByZeroExeeption() (3)DivideByZeroException e (4)new BufferedReader (5)IOException e 解析:(1)extends ArithmeticException
    DivideByZeroException类从ArithmeticException类扩展而来。
    (2)new DivideByZeroExeeption()
    throw一个DivideByZeroException异常函数,打印错误信息。
    (3)DivideByZeroException e
    捕捉DivideByZeroExeeption异常信息。
    (4)new BufferedReader
    动态生成一个BufferedReader对象用于输入。
    (5)IOException e
    字符串成员函数getString中捕捉输入输出异常信息。

  • 第6题:

    对于如下关于随机数的代码 for(int number = 0; number != 5; number = (int)(Math.random() * 10)) { System.out.println(number); } 以下描述正确的是()(2分)

    A.执行时显示数字永不停止

    B.执行时显示数字0后停止

    C.执行时显示数字5后停止

    D.执行时显示数字直到number为5后停止


    执行时显示数字直到number为5后停止