|
- <p>#include<stdio.h>
- #include<string.h>
- void main()
- { char *s;
- char c;
- s=&c;
- printf("which style do you want to:\n");
- printf("Capital (c) or uncapital (a):");
- c=getchar();
- if(c='c') strcpy(s,"COMPUTER");
- else strcpy(s,"computer");
- puts(s);
- }</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-->
复制代码 上述程序有什么问题?
|
|