更多"在Excel中,______函数的功能是将指定单元格区域中的最小值返回"的相关试题:
[单项选择]在Excel中,______函数的功能是将指定单元格区域中的最小值返回并显示在当前单元格中。
A. MAX
B. SMALL
C. MIN
D. LARGE
[填空题]
以下fun函数的功能是:找出具有N个元素的一维数组中的最小值,并作为函数值返回,请填空。(设N已定义)
int fun(int x[N])
{int i,k=0;
for(i=0;i<N;i++)
if(x[i]<x[k])k= (10) ;
return x[k];
}
[填空题]函数Min的功能是返回具有n个元素的数组array中的最小值。请将横线处的缺失部分补充完整,使得程序的输出结果为1.24。
#include<iostream>
using namespace std;
template<typename T>
T Min(T*array, int n)
T min=array[0];
for(int i=1; i<n; i++)
if(array[i]<min)min=array[i];
return min;
int main( )
double art[8]=5.2, 48.45, 41.01, 42, 51.2, 1.24, 14.12, 42;
cout<<______;
return 0:
[单项选择]以下函数返回a所指数组中最小的值所在的下标值:
fun(int *a,int n)
int i,j=0,p;
p=j;
for(i=j;i<n;i++)
If(a[i]<a[p])
______,
return(p);
在横线处应填入的是______。
A. i=p
B. a[p]=a[i]
C. p=j
D. p=i
[填空题]以下程序中,函数 sumColumM的功能是:求出M行N列二维数组每列元素中的最小值,并计算它们的和值。和值通过形参传回主函数输出。请填空。
#define M 2
#define N 4
void SumColumMin(int a[M][N],int *sum)
{ int i,j,k,s=0;
for(i=0;i〈N;i++〉
{ k=0;
for(j=1;j<M;j++=
if(a[k][i]>a[j][i])k=j;
s+=【 】;
=
【 】=s;
=
main( )
{ int x[M][N]={3,2,5,1,4,1,8,3},s;
SumColumMin(【 】);
printf("%d/n",s);
}
[简答题]程序设计题:利用随机函数rand()生成10个整型随机数,输出它们之中的最大值和最小值;如果把最大值和最小值之和的一半称为中间值,输出所有大于中间值的数。
[填空题]函数main( )的功能是:在带头结点的单链表中查找数据域中值最小的结点。请填空
#include
struct node
int data;
struct node *next;int main(struct node *first) /*指针first为链表头指针*/
struct node *p; int m;
p=first->next; m=p->data; p=p->next;
for(; p!=NULL;p=______)
if(p->data<M)   M=P->data;
return m;
[填空题]
函数min( )的功能是:在带头结点的单链表中查找数据域中值最小的结点。请填空
#include <stdio.h>
struct node
{ int data;
struct node *next;
};
int min(struct node *first)/*指针first为链表头指针*/
{ struct node *p; int m;
p=first->next; re=p->data; p=p->next;
for( ;p!=NULL;p= 【20】 )
if(p->data<m ) re=p->data;
return m;
}
[填空题]函数main( )的功能是:在带头结点的单链表中查找数据域中值最小的结点。请填空。
#include<stdio.h>
struct node
int data;
struct node * next;
int main(struct node * first)/*指针first为链表头指针*/
struct node * p;int m;
p=first->next;m=p->data;p=p->next;
for(; p!=NULL;p=______)
if(p->data<m)m=p->data;
return m;
[填空题]以下程序中函数 fun 的功能是:构成一个如图所示的带头结点的单向链表,在结点 的数据域中放入了具有两个字符的字符串。函数 disp 的功能是显示输出该单向链表 中所有结点中的字符串。请填空完成函数 disp。
head
ab cd ef /0
#include
typedef struct node /*链表结点结构*/
{ char sub[3];
struct node *next;
}Node;
Node fun(char s) /* 建立链表*/
{ …… }
void disp(Node *h)
{ Node *p;
p=h->next;
while(= _______ )
{ printf("%s/n",p->sub);p= _______ ; }
}
main( )
{ Node *hd;
hd=fun( ); disp(hd);printf("/n");
}
[简答题]给定程序中,函数fun的功能是将不带头节点的单向链表结点数据域中的数据从小到大排序。即若原链表结点数据域从头至尾的数据为:10、4、2、8、6,排序后链表结点数据域从头至尾的数据为:2、4、6、8、10。
请在程序的下划线处填入正确的内容并把下划线删除, 使程序得出正确的结果。
注意:源程序存放在考生文件夹下的BLANK1.C中。不得增行或删行,也不得更改程序的结构!
给定源程序:
#include
#include
#define N 6
typedef struct node {
int data;
struct node *next;
} NODE;
void fun(NODE *h)
{ NODE *p, *q; int t;
p = h;
while (p) {
q = __1__ ;
while (__2__)
{ if (p->data > q->data)
{ t = p->data; p->data = q->data; q->data = t; }
q = q->next;
}
p = __3__ ;
}
}
NODE *creatlist(int a[])
{ NODE *h,*p,*q; int i;
h=NULL;
for(i=0; idata=a[i];
q->next = NULL;
if (h == NULL) h = p = q;
else { p->next = q; p = q; }
}
return h;
}
void outlist(NODE *h)
{ NODE *p;
p=h;
if (p==NULL) printf("The list is NULL!/n");
else
{ printf("/nHead ");
do
{ printf("->%d", p->data); p=p->next; }
while(p!=NULL);
printf("->End/n");
}
}
main( )
{
[填空题]函数f(x)=2cos2x+sin2x的最小值是().
[填空题]函数y=x2x在区间(0,1]上的最小值为()。
[填空题]以下程序中函数fun的功能是:构成一个如图所示的带头结点的单向链表,在结点的数据域中放入了具有两个字符的字符串。函数disp的功能是显示输出该单链表中所有结点中的字符串。请填空完成函数
disp。
#include
typedef struct node/*链表结点结构*/
{char sub[3];
struct node * next;
}Node;
Node fun(char S) /*建立链表*/
{ ……}
void disp(Node *h)
{Node*P;
P=h->next;
while(【 】)
{printf("%s\n",P->sub);P=【 】; }
}
main( )
{Node *hd;
hd=fun( );disp(hd);prinff("\n");
}
[填空题]以下 isprime 函数的功能是判断形参 a 是否为素数,是素数,函数返回 1,否则返回 0。 请填空。
int isprime(int a)
{ int i; for(i=2;i<=a/2;i++) if(a%i==0) _________;
_______ ;
}
[简答题]求函数f(x)=x3-6x2+9x-4在闭区间[0,2]上的最大值和最小值。