- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
程序修改2(Program modification 2)
程序修改2(Program modification 2)
11, given program MODI1. The function of the function fun in C is to find a prime number that is larger than the formal parameter m followed by M and is returned as a function value.
Please correct the error in the program so that it can draw the correct result.
Note: Do not change the main function, do not add or delete lines, also do not change the structure of the program!
# stdio. h
int fun (int m)
{int I, K;
for (i = m + 1;; evaluating) {
for (k = 2; k I; k++)
/**************found**************/
if (i% k! = 0)
break;
/**************found**************/
if (k)
return (i);
}
}
void Main ()
{
int n;
n = Fun (20);
printf (n=%d\n, N);
}
11, (1) if (i%k==0) (2) if (k=i)
12. The function of the function fun in the given program MODI1. C is: First, the characters in the string of b are stored in reverse order, and then the characters in the string of a refers to the character in the string of B, and the sequence of the number of characters in the array, the number of the length of the remaining characters in the C index group of the tail. For example, when the contents of a string are ABCDEFG, when the contents of the string in B refer to 1234, the contents of the index group of C should be A4B3C2D1EFG, and when the content in a string is 1234, the contents of the string referred to in B
For ABCDEFG, the contents of the C index group should be 1G2F3E4DCBA.
Please correct the error in the program so that it can draw the correct result.
Note: Do not change the main function, do not add or delete lines, also do not change the structure of the program!
# stdio. h
# string. h
void Fun (char $xmltag, Char *b, char *c)
{
int I, J; Char ch;
i = 0; j = strlen (b)-1;
/************found************/
while (I J)
{ch = b[i]; B[i] = B[j]; b[j] = ch;
Evaluating; j--;
}
while ($xmltag | | *b) {
/************found************/
if ($xmltag)
{ *c = *a; +; +; }
if (*b)
{ *c = *b; +; b++; }
}
*c = 0;
}
Main ()
{
Char s1[100], s2[100], t[200];
printf (\nenter
您可能关注的文档
- 枯燥(Boring).doc
- 架构师书单(Architect list).doc
- 架构师(architect).doc
- 架设有效的人才通道(Erection of effective talent channels).doc
- 查出反向木马的反向连接域名(Check reverse Trojan reverse connection domain name).doc
- 查德·布兰森玩疯了的商界奇人(Chad Branson play crazy businessman).doc
- 查看电脑配置(View computer configuration).doc
- 柯南剧场特典(The Conan Theatre Festival).doc
- 柯南剧情(Conan plot).doc
- 柯南每集的名字(Conan's name for each episode).doc
- 空之轨迹SC全任务攻略(Empty track SC full task introduction).doc
- 空之轨迹3RD金手指(Empty tracks, 3RD gold fingers).doc
- 空之轨迹sc 物品代码(Empty track SC item code).doc
- 空之轨迹SC金手指(Empty tracks, SC gold fingers).doc
- 空之轨迹攻略 序章(Empty track Raiders prologue).doc
- 空调不制冷的几大原因分析及维修方法(Analysis and maintenance methods of air conditioning non cooling).doc
- 空姐大谈背后薪资及对象(The stewardess talks about the salary and the object behind it).doc
- 空调产品能效比不应过度炒作(Energy efficiency ratio of air conditioning products should not be over hyped).doc
- 空调安装价格(Air conditioning installation price).doc
- 空调关键字(Air conditioning key).doc
最近下载
- 瓷砖胶品牌、瓷砖胶缺点、瓷砖胶禁忌.doc VIP
- 《杜邦分析法下公司盈利能力分析—以海澜之家为例》7500字.docx VIP
- 2025年高中数学奥林匹克竞赛试卷试题及答案解析.docx VIP
- 住房公积金政策知识竞赛题库附答案(150题).docx VIP
- EN 50618-2014 光伏系统用电缆.pdf VIP
- 边坡治理工程(抗滑桩、锚杆、锚索、挡板、冠梁)专项施工组织设计.doc VIP
- 畜牧兽医法律法规和职业道德(第二版)PPT课件(全).pptx VIP
- 人教版(新教材)七年级上册音乐第一单元《生活中的音乐》全单元教学课件课件.pptx
- 苏教版五年级上册《科学》全套教学课件(共486页PPT).pptx
- 欧洲知识点PPT课件.pptx
文档评论(0)