(2)能被400整除。
(2)能被400整除。
A、第8行: x+2*y 第17行: pow(3,2*a)
B、第8行: x+2y 第17行: pow(3,2a)
C、第8行: sqrt(x+2*y) 第17行: sqrt(pow(3,2*a))
D、第8行: sqrt(x+2y) 第17行: sqrt(pow(3,2a))
下面程序的功能是实现字符串逆序存放。 程序运行结果如下: Input a string:ABCDEFGHI↙ Inversed results:IHGFEDCBA 按要求在空白处填写适当的表达式或语句,使程序完整并符合题目要求。 #include <stdio.h> #include <string.h> #define N 80 void Inverse(char *pStr); int main() { char a[N]; printf("Input a string:"); gets(a); Inverse(a); printf("Inversed results:%s\n", a); return 0; } /* 函数功能: 实现将字符数组中的字符串逆序存放 */ void Inverse(____________) { int len; char temp; char *pStart; /* 指针变量pStart指向字符串的第一个字符 */ char *pEnd; /* 指针变量pEnd指向字符串的最后一个字符 */ len = strlen(pStr); /* 求出字符串长度 */ for (pStart=pStr,___________; pStart <pend; pstart++,__________) { temp="*pStart;" ______________; *pend="temp;" }> A、第16行: char *pStr 第23行: pEnd=pStr+len-1 pEnd-- 第26行: *pStart = *pEnd
B、第16行: char pStr 第23行: pEnd=pStr+len pEnd-- 第26行: *pStart = *pEnd
C、第16行: char *pStr 第23行: pEnd=pStr+len-1 pEnd++ 第26行: pStart = pEnd
D、第16行: char pStr 第23行: pEnd=pStr+len+1 pEnd++ 第26行: *pStart = *pEnd
下面程序的功能是利用泰勒级数计算sinx的值,要求最后一项的绝对值小于,并统计出此时累加了多少项。按要求在空白处填写适当的表达式或语句,使程序完整并符合题目要求。#include <math.h> #include <stdio.h> int main() { int n = 1, count = 1; double e = 1.0, term = 1.0; long fac = 1; for (n=1; ___________; n++) { fac = ________; term = _________; ________________; count++; } printf("e = %f, count = %d\n", e, count); return 0; }
A、第8行: fabs(term)>=1e-5 第10行: fac * n 第11行: 1.0 / fac 第12行: e = e + term
B、第8行: fabs(term)<1e-5 第10行: fac * n 第11行: 1.0 第12行: e="e" term> C、第8行: fabs(term)>1e-5 第10行: fac / n 第11行: 1 / fac 第12行: e = e + term
D、第8行: fabs(term)<=1e-5 1 第10行: fac + n 第11行: 第12行: term="e">
下面程序的功能是利用泰勒级数计算sinx的值,要求最后一项的绝对值小于,并统计出此时累加了多少项。按要求在空白处填写适当的表达式或语句,使程序完整并符合题目要求。#include <math.h> #include <stdio.h> int main() { int n = 1, count = 1; double e = 1.0, term = 1.0; long fac = 1; for (n=1; ___________; n++) { fac = ________; term = _________; ________________; count++; } printf("e = %f, count = %d\n", e, count); return 0; }
A、第8行: fabs(term)>=1e-5 第10行: fac * n 第11行: 1.0 / fac 第12行: e = e + term
B、第8行: fabs(term)<1e-5 第10行: fac * n 第11行: 1.0 第12行: e="e" term> C、第8行: fabs(term)>1e-5 第10行: fac / n 第11行: 1 / fac 第12行: e = e + term
D、第8行: fabs(term)<=1e-5 1 第10行: fac + n 第11行: 第12行: term="e">
以下程序用来完成数学函数P(x, y)的计算,按要求在空白处填写适当的表达式或语句,使程序完整并符合题目要求。#include <math.h> #include <stdio.h> double F(double a); int main() { double x, y, p; scanf("%lf%lf", &x, &y); p = x * y / F(______________); printf("result=%lf\n", p); return 0; } double F(double a) { double f1; f1 = pow(4, a) + sqrt(10 +_____________); return f1; }
A、第8行: x+2*y 第17行: pow(3,2*a)
B、第8行: x+2y 第17行: pow(3,2a)
C、第8行: sqrt(x+2*y) 第17行: sqrt(pow(3,2*a))
D、第8行: sqrt(x+2y) 第17行: sqrt(pow(3,2a))
以下程序用来完成数学函数P(x, y)的计算,按要求在空白处填写适当的表达式或语句,使程序完整并符合题目要求。#include <math.h> #include <stdio.h> double F(double a); int main() { double x, y, p; scanf("%lf%lf", &x, &y); p = x * y / F(______________); printf("result=%lf\n", p); return 0; } double F(double a) { double f1; f1 = pow(4, a) + sqrt(10 +_____________); return f1; }
A、第8行: x+2*y 第17行: pow(3,2*a)
B、第8行: x+2y 第17行: pow(3,2a)
C、第8行: sqrt(x+2*y) 第17行: sqrt(pow(3,2*a))
D、第8行: sqrt(x+2y) 第17行: sqrt(pow(3,2a))
以下程序用来完成数学函数P(x, y)的计算,按要求在空白处填写适当的表达式或语句,使程序完整并符合题目要求。#include <math.h> #include <stdio.h> double F(double a); int main() { double x, y, p; scanf("%lf%lf", &x, &y); p = x * y / F(______________); printf("result=%lf\n", p); return 0; } double F(double a) { double f1; f1 = pow(4, a) + sqrt(10 +_____________); return f1; }
A、第8行: x+2*y 第17行: pow(3,2*a)
B、第8行: x+2y 第17行: pow(3,2a)
C、第8行: sqrt(x+2*y) 第17行: sqrt(pow(3,2*a))
D、第8行: sqrt(x+2y) 第17行: sqrt(pow(3,2a))
下面程序的功能是比较用户键盘输入的口令userInput与内设的口令password是否相同。若相同,则输出"Correct password! Welcome to the system...",若userInput <password,则输出"invalid password!user input> password"。 按要求在空白处填写适当的表达式或语句,使程序完整并符合题目要求。 #include <stdio.h> #include <string.h> int main() { char password[7] = "secret"; char userInput[81] ; printf("Input Password:"); scanf(_____________); if ( ______________ ) printf("Correct password! Welcome to the system...\n"); else if ( ___________________) printf("Invalid password!user input <password\n"); else printf("invalid password!user input> password\n"); return 0; }
A、第8行: "%s", userInput 第9行: strcmp(userInput, password) == 0 第11行: strcmp(userInput, password) < 0
B、第8行: "%c", userInput 第9行: strcmp(userInput, password) = 0 第11行: strcmp(userInput, password) < 0
C、第8行: "%s", userInput 第9行: userInput==password 第11行: userInput <password>
D、第8行: "%c", userInput 第9行: strcpy(userInput, password) == 0 第11行: strcpy(userInput, password) < 0
下面程序的功能是比较用户键盘输入的口令userInput与内设的口令password是否相同。若相同,则输出"Correct password! Welcome to the system...",若userInput <password,则输出"invalid password!user input> password"。 按要求在空白处填写适当的表达式或语句,使程序完整并符合题目要求。 #include <stdio.h> #include <string.h> int main() { char password[7] = "secret"; char userInput[81] ; printf("Input Password:"); scanf(_____________); if ( ______________ ) printf("Correct password! Welcome to the system...\n"); else if ( ___________________) printf("Invalid password!user input <password\n"); else printf("invalid password!user input> password\n"); return 0; }
A、第8行: "%s", userInput 第9行: strcmp(userInput, password) == 0 第11行: strcmp(userInput, password) < 0
B、第8行: "%c", userInput 第9行: strcmp(userInput, password) = 0 第11行: strcmp(userInput, password) < 0
C、第8行: "%s", userInput 第9行: userInput==password 第11行: userInput <password>
D、第8行: "%c", userInput 第9行: strcpy(userInput, password) == 0 第11行: strcpy(userInput, password) < 0
为了保护您的账号安全,请在“简答题”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!