题目内容 (请给出正确答案)
[主观题]

[图] 提示:补充横线上的代码,请使用英文半角输入,不要...

[图] 提示:补充横线上的代码,请使用英文半角输入,不要... 提示:补充横线上的代码,请使用英文半提示:补充横线上的代码,请使用英文半角输入,不要留空格及其他不可见字符。 #include<stdio.h> #define MAXSCORE 20 #define QUESTION 10 #define ORDERS 5 int main() { int p[QUESTION] = { 0,0,0,0,0,0,0,0,0,0 }, n[QUESTION] = { 0,0,0,0,0,0,0,0,0,0 }, s[QUESTION] = { 0,0,0,0,0,0,0,0,0,0 }; int f[ORDERS] = { 0,0,0,0,0 }; int i, score, c, number, pn = 0; char flg, ch[120]; char* title[] = { "90--100 A","80--89 B","70--79 C","60--69 D","0--59 E" }; while (1) { printf("Enter number && score1 -- score10 \n"); if (scanf("%d", &number) == 0) { gets(ch); printf("Error! Input again!\n"); continue; } if (number < 0) break; for (c = 0, i = 0; i < QUESTION && c == i; i++) if (scanf("%d", &p[i])) if (p[i] <= maxscore) c++; if (c 10) { gets(ch); printf("error! input again!\n"); continue; } for score="0," i="0;" question; i++) (____________________) +="p[i];" n[i]++; s[i] flg="(score" ? 'a' : (score 60) 'e' - 10; f[flg-'a']++; pn++; printf("number="%d" mark="%c\n"," number, score, flg); printf("students="%d\n"," pn); (i="0;" orders; printf("%s%7d\n", title[i], f[i]); printf("\n question students average\n"); (n[i]) printf("%6d%10d%10.2f\n", 1, n[i], (float)s[i] n[i]); else printf("%6d%10d%10s\n", " --"); return 0;>

暂无答案
如搜索结果不匹配,请 联系老师 获取答案
您可能会需要:
您的账号:,可能会需要:
您的账号:
发送账号密码至手机
发送
更多“[图] 提示:补充横线上的代码,请使用英文半角输入,不要..…”相关的问题

第1题

[图] 提示:补充横线上的代码,请使用英文半角输入,不要...

提示:补充横线上的代码,请使用英文半角输入,不要留空格及其他不可见字符。 #include <stdio.h> #include <stdlib.h> #define LL 80 #define COL 2 #define CSIZE LL/COL-9 #define PL 50 #define MARGIN 3 char buff[COL][PL][CSIZE]; int ln[COL][PL]; int col, row, p; void printout() { int k, i, lpos, col, d,j; char line[LL]; for (k = 0; k < MARGIN; k++) putchar('\n'); for (k = 0; k < PL; k++) { for (i = 0; i < LL - 1; i++) { line[i] = ' '; for (lpos = 0, col = 0; col < COL; lpos += CSIZE + 9, col++) { d = ln[col][k]; p = lpos + 4; while (d > 0) { line[p--] = d % 10 + '0'; d /= 10; } for (p = lpos + 7, j= 0; j < CSIZE;j++) line[p++] = buff[col][k][j]; } } line[p] = '\0'; puts(line); } for (k = 0; k < MARGIN; k++) putchar('\n'); } void nextline() { while (p < CSIZE) buff[col][row][p++] = ' '; if (++row >= PL) { if (++col >= COL) { printout(); col = 0; } row = 0; } p = 0; } void dprint(char* fname) { FILE* fp; int lin, c; if ((fp = fopen(fname, "r")) == NULL)exit(-1); lin = 0; p = 0; col = 0; c = getc(fp); while (c != EOF) { ln[col][row] = ++lin; while (c != '\n' && c != EOF) { if (p >= CSIZE) { nextline(); ln[col][row] = 0; } __________________; c = getc(fp); } nextline(); if (c != EOF)c = getc(fp); } while (col != 0 || row != 0) { ln[col][row] = 0; nextline(); } fclose(fp); } int main(int argc, char** argv) { int f; for (f = 1; f < argc; f++) dprint(argv[f]); return 0; }

点击查看答案

第2题

[图] 提示:补充横线上的代码,请使用英文半角输入,不要...

提示:补充横线上的代码,请使用英文半角输入,不要留空格及其他不可见字符。 #include <stdio.h> #include <math.h> #define DECISE .0005 #define MAX_POWER 100 int main() { int i, a, b; float Ca[MAX_POWER + 1], Cb[MAX_POWER + 1]; void Remainder(float* PointerA, float* PointerB, int a, int b); scanf("%d", &a); for (i=0; i <=a; i++) scanf("%f", &ca[i]); scanf("%d", &b); for (i="0;" i &cb[i]); remainder(ca, cb, a, b); return 0; } void remainder(float* pointera, float* pointerb, int b) { float x, y, * temp; i, j, flag="1;" while (flag) (pointerb[i]="=" 0) i++; b--; pointerb+="i--;" x="PointerB[i];" pointerb[i++] x; ____________________________; (j="0;" j j++) y="PointerA[i+1+j]-x*PointerB[j+1];" pointera[i+1+j]="(y&lt;DECISE&amp;&amp;-y&lt;DECISE)?0.0:y;" temp="PointerA;" pointera="PointerB;" pointerb="(a&lt;b)" ? temp:temp+a-b+1; a="b--;" (flag="0," b && if !="0.0)" printf("the greatest common factor is:\n"); a; (pointera[i] printf("%5.3f*x∧%d%s", printf("%5.3f\n", pointera[a]);>

点击查看答案

第3题

[图] 提示:补充横线上的代码,请使用英文半角输入,不要...

提示:补充横线上的代码,请使用英文半角输入,不要留空格及其他不可见字符。 #include<stdio.h> #define MAXN 10 void divisor(int n, int m, int d[], int dn) { int s, p, t, b[MAXN]; for (s = 0; s<dn && d[s]>n; s++); p = 0; b[0] = s; t = d[b[p]]; while (t != n && p >= 0) { if (p < m - 1) { for (s = b[p]; s<dn 1 - && t + d[s]>n; s++); if (s <= 1 dn - && t + d[s] { b[++p]="s;" continue; } while (b[p]="=" --p>= 0) t -= d[b[p]]; if (p >= 0) ___________________________; } if (t == n) { printf("%4d=%3d", n, d[b[0]]); for (s = 1; s <= p; s++) printf("+%3d", d[b[s]]); printf("\n"); } else printf("no solution.\n");>

点击查看答案

第4题

[图] 提示:补充横线上的代码,请使用英文半角输入,不要...

提示:补充横线上的代码,请使用英文半角输入,不要留空格及其他不可见字符。 #include<stdio.h> #define SIZE 5 int a[SIZE][SIZE], k; int makeline(int row_start,int col_start,int row_end) { int i, j, sign = ((row_end-row_start)>0)*2-1; for(i=row_start, j=col_start; ______________; i+=sign, j+=sign) a[i][j]=k++; return 0; } int makeArray(int n) { int d; for(d=1; d<=2*n+1; d++) if(d%2)makeline(n,d-1, n+1-d); else makeline(n+1-d,0,n); if(d%2)makeline(2*n-d+1,n,0); makeline(0,d-n-1,2*n-d+1); return 0; } int main() { i,j,n,n; for(n="3;N&lt;=SIZE;N++)" k="1;" makearray(n="N-1);" printf("\nn="%d;\n&quot;,n+1);" for(i="0;i&lt;=n;i++)" for(j="0;j&lt;=n;j++)printf(&quot;%4d&quot;,a[i][j]);" printf("\n");>

点击查看答案

第5题

[图] 提示:补充横线上的代码,请使用英文半角输入,不要...

提示:补充横线上的代码,请使用英文半角输入,不要留空格及其他不可见字符。 #include <stdio.h> #define MAXNUM 100 int sum(int n, int* pa) { int count, total, temp; *pa = 2; *++pa = 3; total = 5; count = 2; while (count++ < n) { temp = *(pa - 1) * *pa; if (temp < 10) { total += temp; *(++pa) = temp; } else { *++pa=temp/10; total += *pa; if (count < n) { count++; pa++; __________________; total += *pa; } } } return(total); } int main() { int n, * p, * q, num[MAXNUM]; do { printf("请输入N=? (2<n<%d):", maxnum + 1); scanf("%d", &n); } while || n>MAXNUM); printf("\nsum(%d)=%d\n", n, sum(n, num)); for (p = num, q = p + n; p < q; p++) printf("%4d", *p); printf("\n"); return 0; }

点击查看答案

第6题

[图] 提示:补充横线上的代码,请使用英文半角输入,不要...

提示:补充横线上的代码,请使用英文半角输入,不要留空格及其他不可见字符。 #include <stdio.h> #include <string.h> int add(int x, int y) { return x + y; } int sub(int x, int y) { return x - y; } int mul(int x, int y) { return x * y; } int div(int x, int y) { return x / y; } int (*func[])(int ,int) = { add,sub,mul,div }; int num, curch; char chtbl[] = "+-*/()="; char corch[] = "+-*/()=0123456789"; int getach() { int i; while (1) { curch = getchar(); if (curch == EOF) return -1; for (i = 0; corch[i] && curch != corch[i]; i++); if (i < strlen(corch)) break; } return curch; } int getid() { int i; if (curch >= '0' && curch <= '9') { for (num="0;" curch>= '0' && curch <= 10 '9'; getach()) num="num" * + curch - '0'; return -1; } else { for (i="0;" chtbl[i]; i++) if (chtbl[i]="=" curch) break; getach(); i; int cal() x1, x2, x3, op1, op2, i="getid();" 4) x1="cal();" op1="getid();" (op1>= 5) return x1; i = getid(); if (i == 4) x2 = cal(); else x2 = num; op2 = getid(); while (!(op2 >= 5)) { i = getid(); if (i == 4) x3 = cal(); else x3 = num; if ((op1 / 2 == 0) && (op2 / 2 == 1)) x2 = (*func[op2])(x2, x3); else { x1 = (*func[op1])(x1, x2); x2 = x3; ____________________; } op2 = getid(); } return (*func[op1])(x1, x2); } void main() { int value; printf("Please input an expression:\n"); getach(); while (curch != '=') { value = cal(); printf("The result is : %d\n", value); printf("Please input an expression:\n"); getach(); } }

点击查看答案

第7题

[图] 提示:补充横线上的代码,请使用英文半角输入,不要...

提示:补充横线上的代码,请使用英文半角输入,不要留空格及其他不可见字符。 #include<stdio.h> #define N 100 long factor(int m, int fac[], int* cp) { int c1, c2, i, k; long s; fac[0] = 1; for (c1 = s = 1, c2 = N - 1, i = 2;;) { k = m/i; if (m % i == 0) if(i<k) { fac[c1++]="i;" fac[c2--]="k;" s +="i" k; } else i++; if (i>=k) break; } for (c2++; c2 <= n - 1; c2++) ____________________________; *cp="c1;" return s;>

点击查看答案

第8题

[图] 注:请用半角英文符号输入答案,不要含有空格! 注:...

注:请用半角英文符号输入答案,不要含有空格! 注:请用半角英文符号输入答案,不要含有空格! 注:请用半角英文符号输入答案,不要含有空格!

点击查看答案

第9题

设[图],且X与Y相互独立,则[图]————————.(请用半角输入...

,且X与Y相互独立,则————————.(请用半角输入小数结果)

点击查看答案

第10题

[图] (结果用罗列法表示,答案格式英文状态下输入,不要...

(结果用罗列法表示,答案格式英文状态下输入,不要有空格)

点击查看答案
热门考试 全部 >
相关试卷 全部 >
账号:
你好,尊敬的上学吧用户
发送账号至手机
获取验证码
发送
温馨提示
该问题答案仅针对搜题卡用户开放,请点击购买搜题卡。
马上购买搜题卡
我已购买搜题卡, 登录账号 继续查看答案
重置密码
确认修改
谢谢您的反馈

您认为本题答案有误,我们将认真、仔细核查,
如果您知道正确答案,欢迎您来纠错

警告:系统检测到您的账号存在安全风险

为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!

微信搜一搜
上学吧
点击打开微信
警告:系统检测到您的账号存在安全风险
抱歉,您的账号因涉嫌违反上学吧购买须知被冻结。您可在“上学吧”微信公众号中的“官网服务”-“账号解封申请”申请解封,或联系客服
微信搜一搜
上学吧
点击打开微信