搜索
查看: 737|回复: 2
打印 上一主题 下一主题

求助

[复制链接]
跳转到指定楼层
楼主
发表于 2013-12-24 21:17:29 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
  1. <p>#include<stdio.h>
  2. #include<string.h>
  3. void main()
  4. { char *s;
  5.   char c;
  6.   s=&c;
  7.   printf("which style do you want to:\n");
  8.   printf("Capital (c) or uncapital (a):");
  9.   c=getchar();
  10.   if(c='c') strcpy(s,"COMPUTER");
  11.   else strcpy(s,"computer");
  12.   puts(s);
  13. }</p><p>要求运行结果为:</p><p class="p0" style="margin-top: 0pt; margin-bottom: 0pt;"><span style='font-family: "宋体"; font-size: 12pt; mso-spacerun: "yes";'>which style you want to:</span><span style='font-family: "宋体"; font-size: 12pt; mso-spacerun: "yes";'><o:p></o:p></span></p><p class="p0" style="margin-top: 0pt; margin-bottom: 0pt;"><span style='font-family: "宋体"; font-size: 12pt; mso-spacerun: "yes";'>  Capital (c) or uncapital (a):c</span><span style='font-family: "宋体"; font-size: 12pt; mso-spacerun: "yes";'><o:p></o:p></span></p><p class="p0" style="margin-top: 0pt; margin-bottom: 0pt;"><span style='font-family: "宋体"; font-size: 12pt; mso-spacerun: "yes";'>  COMPUTER</span><span style='font-family: "宋体"; font-size: 12pt; mso-spacerun: "yes";'><o:p></o:p></span></p><p class="p0" style="margin-top: 0pt; margin-bottom: 0pt;"><span style='font-family: "宋体"; font-size: 12pt; mso-spacerun: "yes";'>  Which sytle you want to:</span><span style='font-family: "宋体"; font-size: 12pt; mso-spacerun: "yes";'><o:p></o:p></span></p><p class="p0" style="margin-top: 0pt; margin-bottom: 0pt;"><span style='font-family: "宋体"; font-size: 12pt; mso-spacerun: "yes";'>  Capital (c) or uncapital (a):u</span><span style='font-family: "宋体"; font-size: 12pt; mso-spacerun: "yes";'><o:p></o:p></span></p><p class="p0" style="margin-top: 0pt; margin-bottom: 0pt;"><span style='font-family: "宋体"; font-size: 12pt; mso-spacerun: "yes";'>  computer</span><span style='font-family: "宋体"; font-size: 12pt; mso-spacerun: "yes";'><o:p></o:p></span></p><!--EndFragment-->
复制代码
上述程序有什么问题?

沙发
发表于 2014-2-23 08:55:20 | 只看该作者
艾玛头都晕了
板凳
发表于 2014-2-23 22:39:20 | 只看该作者
这段代码可能是某网页的一小段代码~~
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

广播台
特别关注
快速回复 返回顶部 返回列表