FILE *fp =NULL;charc;inti;if( (fp=fopen("test","w")) ==NULL) {printf("open file test error!\n");exit(EXIT_FAILURE); } while( (c=getchar()) != EOF && c !='!') {if( c>='a'&& c<='z') c = c-'a'+'A';fputc(c, fp); } fclose(fp); } 结果: 输入: ...
inti; if( (fp=fopen("test","w"))==NULL) { printf("open file test error!\n"); exit(EXIT_FAILURE); } while( (c=getchar())!=EOF&&c!='!') { if(c>='a'&&c<='z') c=c-'a'+'A'; fputc(c,fp); } fclose(fp); } 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12...
1. Re:c语言程序设计第五版课后答案谭浩强 第七章课后答案 13题那个((2n-1)x * polya(n-1,x)-(n-1)polya(n-2,x))/n; 写错了吧, 应该是((2n-1)x - polya(n-1,x)-(n-1)polya(n-2,x... --CosmantCopyright © 2024 chenke21 Powered by .NET 8.0 on Kubernetes ...
FILE *fp =NULL;charc;inti;if( (fp=fopen("test","w")) ==NULL) {printf("open file test error!\n");exit(EXIT_FAILURE); }while( (c=getchar()) != EOF && c !='!') {if( c>='a'&& c<='z') c = c-'a'+'A'; fputc(c, fp); } fclose(fp); } 结果: 输入: 123我的...