《近几年三级网络技术上机高频题(必考)》由会员分享,可在线阅读,更多相关《近几年三级网络技术上机高频题(必考)(2页珍藏版)》请在金锄头文库上搜索。
1、int i, j, half, hun, ten, data; for (i=101; i= half) cnt+; sum += i; 数的按位分离及合并int i, j; int a1, a2, a3, a4, k; for (i=0; i bj) k = bi; bi = bj; bj = k; 数位分解后按特定关键字进行排序int i, j, data; for (i=0; i aaj%1000) data = aai; aai = aaj; aaj = data; else if (aai%1000 = aaj%1000) if (aai aj) flag = 1; else fla
2、g = 0; break; if (flag=1 cnt+; for (i=0; i bj) k = bi; bi = bj; bj = k; 数值筛选并统计int i, thou, hun, ten, data; int ab; long sum = 0; for (i=0; i 0) totNum+; thou = xxi/1000; hun = xxi%1000/100; ten = xxi%100/10; data = xxi%10; ab = thou+hun+ten+data; if (ab%2 = 0) totCnt+; sum = sum+xxi; totPjz = (doub
3、le)sum/totCnt; 方差计算for (i=0; i32) *pf = *pf*11%256; pf+; 字符串特殊排序int i, j, k, strl; char ch; for (i=0; i xxik) ch = xxij; xxij = xxik; xxik = ch; 按结构体成员进行多关键字排序int i, j; PRO xy; for (i=0; i 0) xy = selli; sell i = sellj; sellj = xy; else if (strcmp(selli.mc, sellj.mc) = 0) if (selli.je sellj.je) xy =
4、 selli; selli = sellj; sellj = xy; 结构体筛选并排序int i, cnt = 0, j; data ch; for (i=0; i aai.x1+aai.x3) bbcnt = aai; cnt+; for (i=0; i 5) for (j=0; j=2; i-) s1 = (s1+m-1)%i; if (s1 = 0) s1 = i; w = ps1-1; for (j=s1; j= half) return 1; else return 0; 以地推关系求数列值int f1 = 0, f2 = 1, fn; fn = f1+f2; while (fn = t) f1 = f2; f2 = fn; fn = f1+f2; return fn; 用迭代法求方程的根float X0, X1 = 0.0; while (1) X0 = X1; X1 = (float)cos(X0); if (fabs(X0-X1) 1e-6) break; return X1;