问答题
printf("\n");
【参考答案】
int fun (int a[][N])
{
int i,j;
for(i=0;i<N......
(↓↓↓ 点击下方‘点击查看答案’看完整答案、解析 ↓↓↓)
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
填空题
下列给定程序中,fun()函数的功能是:根据形参m,计算下列公式的值。 t=-1+1 2+1 3+1 4+…+1 m 例如,若输入5,则应输出2.283333。 请改正程序中的错误,使它能计算出正确的结果。 注意:不要改动main函数,不得增行或删行,也不得更改程序的结构。 试题程序: #include <conio.h> #include <stdio.h> double fun(int m) double t=1.0; int i; for(i=2;i<=m;i++) *************found************** t+=1.0 k; *************found************** return i; main() int m; clrscr(); printf( nPlease enter linteger number: ); scanf( %d ,&m); printf( nThe result is%1f n , fun(m));
点击查看答案&解析
填空题
请补充函数fun(),该函数的功能是将字符串tt中的大写字母都改为对应的小写字母,其他字符不变。例如,若输入“Are you come from Sichuan”,则输入“are you come from sichuan”。 注意:部分源程序给出如下。 请勿改动主函数main和其他函数中的任何内容,仅在函数fun()的横线上填入所编写的若干表达式或语句。 试题程序: #include<stdio.h> #include<string.h> #include<conio.h> char *fun(char tt[]) int i; for(i=0;tt[i];i++) if((tt[i]>=’A’)&&( 【1】 )) 【2】 ; return ( 【3】 ) ; main() char tt[81]; printf( nPlease enter a string: ); gets(tt); printf( nThe result string is: n%s , fun(tt));
点击查看答案&解析
相关试题
下列给定程序中,fun()函数的功能是:根...
请补充函数fun(),该函数的功能是将字符...