题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2023-10-23 13:44:53

[简答题]下面程序的功能是把316表示为两个加数的和,使两个加数分别能被13和11整除,在划线处应填入的选项是
#include <iostream.h>
void main( )

int i=0,j,k;
doi++;k=316-13*i;while(______);
j=k/11;
cout<<"316=13*"<<i<<"+11*"<<j;

更多"下面程序的功能是把316表示为两个加数的和,使两个加数分别能被13和1"的相关试题:

[简答题]下面程序的功能是把316表示为两个加数的和,使两个加数分别能被13和11整除,在下画线处应填入的选项是
#include<iostream.h>
Void main( )

int i=0,j,k;
doi++;k=316-13 * i;while(____) ;
j=k/11;
cout < < "316=13 * " < < i < < " +11 *" < < j;

A) k/11 B) k%11 C) k/11=0 D) k%11=0
[单项选择]下面程序的功能是把316表示为两个加数的和,使两个加数分别能被13和11整除,则在横线上应填入的语句是( )。 public class Test { public static void main (String[] args) { int i=0,j,k; do { i++; k=316-13*i; } while(__________); j=k/11; System.out.print("316=13*"+i+"+11*"+j); } }
A. k/11!=0
B. k%11!=0
C. k/11==0
D. k%11==0
[单项选择]下面程序的功能是统计字符串中“array”的个数,在程序的空白处应填入的正确选项是 public class FindKeyWords{  public static void main(String[]args) {   String text="An array is a data structur that stores a collection of"         +"values of the same type. You access each indMdual value"         +"through an integer index. For example,if a is an array"         +"of inergers,then a[i]is the ith integer in the array.";   int arrayCount=0;   int index=-1;   String arrayStr="array";   index=text.indexOf(arrayStr);   while(index>=0) {    ++arrayCount;    index+=arrayStr.length( );    index=text.indexOf(arrayStr,index);   }   System.out.println("the text contains"+arrayCount+"arrays");  } }
A. <
B. =
C. <=
D. >=
[简答题]
阅读以下说明和C++程序,将应填入(n)处的字句写在对应栏内。
【说明】
下面程序的功能是计算并输出某年某月的天数,函数IsLeap Year( )能够判断是否是闰年。
【C++程序】
# include < iostream >
using namespace std;
(1) Month {Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec };
class Date {
public:
Date( int year, Month m_ month) {
this→year = year;
if( (2) ) month: Jan;
else month = m_ month;
};
~Date( ){};
bool IsLeap Year( ) {
return ((year%4= =0 &&year% 100 ! =0)|| year%400= =0);
};
int CaculateDays( ) {
switch(m_month ) {
case (3) ;{
if (4) return 29;
else return 28;
}
case Jan: case Mar: case May: case Jul: case Aug: case Oct: case Dec: return 31;
case Apr: case Jun: case Sop: case Nov: return 30;
}
}
private:
int year;
Month month;
};
void main( ) {
Date day(
[单项选择]下列程序的功能是将一个整数数组写入二进制文件,在程序的下面线处应填入的选项是______。
importjava. io. * ;
public class XieShuzu
public static void main(String[] a)
int[]myArray=(10,20,30,40);
try
DataOutputStream dos=
new DataOutputStream(new
FileOutput Stream("ints. dat"))"
for(int i=0; i<myArray. length; i++)
dos. ______(myArray[i]);
dos. close( );
System. out. println("已经将整数数组写入二进制文件:ints. dat");
catch(IOException ioe)
System. out. println("IO Excepr_on");


A. writeArray
B. writeByte
C. writeInt
D. writeDouble
[单项选择]

下面程序的功能是输出以下形式的金字塔图案是:
*
***
*****
*******在下划线处应填入的是()
main( )
{int i,j;
for(i=1;i<=4;i++)
{for(j=1;j<=4-i;j++) pintf(" ");
for(j=1;j<=________;j++) pintf("*");
printf("/n");
}
}


A. i
B. 2*i-1
C. 2*i+1
D. i+2
[单项选择]下面程序的功能是将从键盘输入的一对数,由小到大排序输出,当输入一对相等数时结
束循环,在划线处应填入的选项是
  #include<iostream.h>
  voidmain( )
   inta,b,t;
    cin>>a>>b;
  while(______)
   if(a>b)
     t=a;a=b;b=t;
    cout<<a<<""<<b<<endl;
    cin>>a>>b;

A. !a=b
B. a!=b
C. a=:b
D. a=b

我来回答:

购买搜题卡查看答案
[会员特权] 开通VIP, 查看 全部题目答案
[会员特权] 享免全部广告特权
推荐91天
¥36.8
¥80元
31天
¥20.8
¥40元
365天
¥88.8
¥188元
请选择支付方式
  • 微信支付
  • 支付宝支付
点击支付即表示同意并接受了《购买须知》
立即支付 系统将自动为您注册账号
请使用微信扫码支付

订单号:

请不要关闭本页面,支付完成后请点击【支付完成】按钮
恭喜您,购买搜题卡成功
重要提示:请拍照或截图保存账号密码!
我要搜题网官网:https://www.woyaosouti.com
我已记住账号密码