SELECT CEILING( -14.7 ), CEILING( 14.7 )的结果是( )
A. -15,15
B. -14,15
C. -14,14
D. -15,14
相关问题推荐
-
设已有定义: float x; 则以下对指针变量 p 进行定义且赋初值的语句中正确的是
A)float *p=1024;
B)int *p=(float)x;
C)float p=&x;
D)float *P=&x;
-
若有以下程序
#include
int a[]={2,4,6,8};
main()
{ int i;
int *p=a;
for(i=0;i<4;i++)a[i]=*p;
printf("%d\n",a[2]);}
上面程序的输出结果是
A.6
B.8
C.4
D.2
-
windows7中,要移动窗口,可以用鼠标移动窗口()。
A、菜单栏
B、标题栏
C、滚动条
D、边框
-
使用VC6打开考生文件夹下的工程RevProj8。此工程包含一个源程序文件 RevMain8.cpp。在该文件中,函数resort的功能是:能在一个数列中,对从指定位置开始的几位数,按相反顺序重新排列,并在主函数中输出新的序列。
请改正程序中的错误,使它能得到正确结果。
注意,不要改动main函数,不得删行或增行,也不得更改程序的结构。
源程序文件RevMain8.cpp中的程序清单如下:
//RevMain8.cpp
include <instream>
using namespace std;
void resort(int arr[],int where,int amount);
int main ()
{
int number [20] ,where, arrount, i;
cout<<"Input 20 numbers\n";
for (i=0; i<20; i++)
cin>>number [i];
cout<<"How many do you want to sort: ";
cin>>arrount;
cout<<"\n where do you want to start: ";
cin>>where;
cout<<"old array as follow:\n";
for (i=0; i<20; i++)
cout<<nmuber [i] <<" ";
resort (number,where, arrount);
cout<<"\n resorted array as follow:\n";
for (i=0; i<20; i++)
cout<<number [i] <<" ";
cout<<end1;
return 0;
}
void resort(int array[],int where, int amount)
{
int *pi, *p2, temp;
p1=&array [where-1];
p2=&array [where-2+amount];
/* * * * *FOUND * * * * */
for (;p1<&array [where-1+amount/2]; )
{
/* * * * *FOUND * * * * */
*p1=*p2;
*p2=*p1;
}
return;
}
-
设有s(学号,姓名,性别)和sc(学号,课程号,成绩)两个表,下面SQL的SELECT语句检索选修的每门课程的成绩都高于或等于85分的学生的学号、姓名和性别。SELECT 学号,姓名,性别 FROM sWHERE ___ (SELECT * FROM sc WHERE sc.学号=s.学号 AND 成绩<85)