#include
void writeExcel() {
int n; char ch; FILE *fp = NULL; //打开文件 fp = fopen("C:\\Users\\Zhouhao\\Desktop\\cprogram\\test.xls", "w"); for (int i = 1; i < 6; i++) {
printf("Please input:"); scanf("%d %c", &n, &ch); fprintf(fp, "%d\t%c\n", n, ch); } //关闭文件 fclose(fp); } int main(void) {
writeExcel(); return 0; }
发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/176237.html原文链接:https://javaforall.net
