#include <stdio.h>
#include <stdlib.h>
int main()
{
char s[8][30]={
"CS0160資訊安全實習,丙",
"CS0160資訊安全實習,甲",
"GE0105A勞作教育,丙",
"IM0007程式設計,丙",
"IM0068統計學[二],甲",
"IM0164資訊安全實習,丙",
"OHA001導師,丙",
"OHTA003在校輔導時間,乙"
};
FILE* fp=fopen("score.xls","w");
for (int i=0; i<8; i++)
fprintf(fp,"%d\t%s\n",i,s[i]);
fclose(fp);
system("Pause");
return 0;
}
herrDeng網內搜尋
自訂搜尋
Ads
2009年6月9日 星期二
fopen
修改下列C程式,將你上學期的各科成績出到excel檔!
訂閱:
張貼留言 (Atom)
熱門文章
-
11!=?
-
輸出字串20次
-
計算你上學期加權平均
-
int a[]={21, 23, 57, 13 ,17, 6}; float average; average=?
-
產生50個元素的陣列並排序
-
1. 利用遞迴input n算2^n 2. 用C算GCD(3333,456)
-
C字串練習 字串 char word[]="You win!"; 輸出為: You win! You win You wi You w You You Yo Y 給進階使用者: gets () 是個危險的函式!
-
解釋memset, memcpy
-
猜數字
-
xgbzft
16 則留言:
#include <stdio.h>
#include <stdlib.h>
int main()
{
char s[12][30]={
"體育",
"勞作教育",
"會計學",
"英文",
"操行",
"計算機概論",
"經濟學",
"軍訓",
"微積分",
"管理學",
"中國通史",
"國文",
};
int a[12]={66,75,82,83,84,84,87,88,88,88,88,96};
FILE* fp=fopen("score.xls","w");
for (int i=0; i<12; i++)
fprintf(fp,"%s\t%d\n",s[i],a[i]);
fclose(fp);
system("Pause");
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int main()
{
char s[12][30]={
"勞作教育",
"計算機概論",
"英文",
"體育",
"經濟學",
"管理學",
"中國通史",
"操行",
"會計學",
"軍訓",
"微積分",
"國文",
};
int a[12]={75,76,79,79,80,80,83,84,84,89,92,96};
FILE* fp=fopen("score.xls","w");
for (int i=0; i<12; i++)
fprintf(fp,"%s\t%d\n",s[i],a[i]);
fclose(fp);
system("Pause");
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int main()
{
char s[12][100]={
"CR1001 操行 ",
"GE0101A 國文 ",
"GE0102A 英文 ",
"GE0103A 中國通史 ",
"GE0105A 勞作教育 ",
"IM0004 管理學 ",
"IM0041 計算機概論 ",
"IM0042 微積分(一) ",
"IM0043 經濟學(一) ",
"IM0044 會計學(一) ",
"ML01AA 軍訓 ",
"PE01AA 體育(大一) ",
};
int a[12]={90,99,83,90,75,86,73,72,87,83,89,80};
FILE* fp=fopen("score.xls","w");
for (int i=0; i<12; i++)
fprintf(fp,"%s\t%d\n",s[i],a[i]);
fclose(fp);
system("Pause");
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int main()
{
char s[12][30]={
"操行",
"國文",
"英文",
"中國通史",
"勞作教育",
"管理學",
"計算機概論",
"微積分",
"經濟學",
"會計學",
"軍訓",
"體育",
};
int a[12]={89,78,77,79,85,72,64,60,67,81,81,76};
FILE* fp=fopen("score.xls","w");
for (int i=0; i<12; i++)
fprintf(fp,"%s\t%d\n",s[i],a[i]);
fclose(fp);
system("Pause");
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int main()
{
char s[12][30]={
"國文",
"英文",
"微積分",
"經濟學 ",
"會計學",
"中國通史",
"管理學",
"計算機概論",
"軍訓",
"體育",
"勞作教育",
"操行"
};
int a[12]={80,62,60,75,80,65,84,60,72,72,80,83};
FILE* fp=fopen("score.xls","w");
for (int i=0; i<12; i++)
fprintf(fp,"%s\t%d\n",s[i],a[i]);
fclose(fp);
system("Pause");
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int main(){
char s[12][50]={
"CR1001 操行",
"GE0101A 國文",
"GE0102A 英文",
"GE0103A 中國通史",
"GE0105A 勞作教育",
"IM0004 管理學",
"IM0041 計算機概論",
"IM0042 微積分(一)",
"IM0043 經濟學(一)",
"IM0044 會計學(一)",
"ML01AA 軍訓",
"PE01AA 體育(大一)",
};
int a[12]={83,78,75,80,75,84,77,94,85,85,84,73};
FILE*fp=fopen("score.xls","w");
for (int i=0;i<12;i++)
fprintf(fp,"%s\t%d\n",s[i],a[i]);
fclose(fp);
system("pause");
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int main()
{
char s[12][50]={
"CR1001 操行",
"GE0101A 國文",
"GE0102A 英文",
"GE0103A 中國通史",
"GE0105A 勞作教育",
"IM0004 管理學",
"IM0041 計算機概論",
"IM0042 微積分(一)",
"IM0043 經濟學(一)",
"IM0044 會計學(一)",
"ML01AA 軍訓",
"PE01AA 體育(大一)",
};
int a[]={83,94,65,64,75,77,63,64,80,80,89,73};
FILE* fp=fopen("score.xls","w");
for (int i=0; i<8; i++)
fprintf(fp,"%s\t%d\n",s[i],a[i]);
fclose(fp);
system("Pause");
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int main()
{
char s[11][100]={
"GE0101A 丙 國文 ",
"GE0102A 丙 英文 ",
"GE0103A 丙 中國通史 ",
"IM0004 丙 管理學 ",
"IM0041 丙 計算機概論 ",
"IM0042 丙 微積分(一) ",
"IM0043 丙 經濟學(一) ",
"IM0044 丙 會計學(一) ",
"GE0105A 丙 勞作教育 ",
"ML01AA 丙 軍訓 ",
"PE01AA 丙 體育(大一) ",
};
int a[11]={92,72,88,74,74,77,86,78,75,89,74};
FILE* fp=fopen("score.xls","w");
for (int i=0; i<11; i++)
fprintf(fp,"%s\t%d\n",s[i],a[i]);
fclose(fp);
system("Pause");
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int main()
{
char s[12][30]={
"計算機概論",
"微積分",
"軍訓",
"英文",
"中國通史",
"體育",
"國文",
"經濟學",
"管理學",
"操行",
"勞作教育",
"會計學",
};
int a[12]={60,60,68,70,70,74,75,76,77,84,85,86};
FILE* fp=fopen("score.xls","w");
for (int i=0; i<12; i++)
fprintf(fp,"%s\t%d\n",s[i],a[i]);
fclose(fp);
system("Pause");
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int main()
{
char s[12][30]={
"勞作教育",
"計算機概論",
"英文",
"體育",
"經濟學",
"管理學",
"中國通史",
"操行",
"會計學",
"軍訓",
"微積分",
"國文",
};
int a[12]={75,76,79,62,77,79,88,84,84,91,81,89};
FILE* fp=fopen("score.xls","w");
for (int i=0; i<12; i++)
fprintf(fp,"%s\t%d\n",s[i],a[i]);
fclose(fp);
system("Pause");
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int main()
{
char s[12][30]={
"計算機概論",
"微積分",
"軍訓",
"英文",
"中國通史",
"體育",
"國文",
"經濟學",
"管理學",
"操行",
"勞作教育",
"會計學", };
int a[12]={73,60,63,78,72,66,80,85,72,84,75,87};
FILE* fp=fopen("score.xls","w");
for (int i=0; i<12; i++)
fprintf(fp,"%s\t%d\n",s[i],a[i]);
fclose(fp);
system("Pause");
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int main()
{
char s[11][30]={
"GE0101A 國文",
"GE0102A 英文",
"GE0103A 中國通史",
"GE0105A 勞作教育",
"IM0004 管理學",
"IM0041 計算機概論",
"IM0042 微積分(一)",
"IM0043 經濟學(一)",
"IM0044 會計學(一)",
"ML01AA 軍訓",
"PE01AA 體育(大一)"
};
char c[11][3]={"87","89","87","75","88","81","98","88","83","90","75"};
FILE* fp=fopen("score.xls","w");
for (int i=0; i<8; i++)
fprintf(fp,"%d\t%s\t%s\t\n",i,s[i],c[i]);
fclose(fp);
system("Pause");
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int main()
{
char s[11][35]={
"CR1001操行,89",
"GE0203A英文字彙與閱讀,87",
"GE0204A公民社會概論,81",
"GE0205A人類活動與地球環境變遷,89",
"IM0009資料結構,76",
"IM0021資料庫管理系統,62",
"IM0044會計學(一),79",
"IM0063統計學[一],62",
"IM0103企業電子化,79",
"PE0Z0M體育(韻律),87",
"IM0024會計資訊系統,76"
};
FILE* fp=fopen("score.xls","w");
for (int i=0; i<11; i++)
fprintf(fp,"%d\t%s\n",i,s[i]);
fclose(fp);
system("Pause");
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int main()
{
char s[11][50]={
"英文字彙與閱讀 69",
"公民社會概論 81",
"人類活動與地球環境變遷 80",
"資料結構 90",
"資料庫管理系統 74",
"統計學[一] 78",
"企業電子化 80",
"體育(韻律) 89",
"基礎日文[一般] 61",
"生產管理 62",
"會計資訊系統 73",
};
FILE* fp=fopen("score.xls","w");
for (int i=0; i<11; i++)
fprintf(fp,"%d\t%s\n",i,s[i]);
fclose(fp);
system("Pause");
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int main()
{
char s[10][40]={
"選修 GE3ZA033 甲 科技與人文[科技] 2 60 " ,
"必修 IM0017 乙 系統分析與設計 3 64 ",
"必修 IM0021 乙 資料庫管理系統 3 85 ",
"必修 IM0022 乙 資訊管理實務專題(一) 1 82" ,
"必修 IM0039 乙 資訊管理講座(一) 1 62 ",
"必修 IM0041 乙 計算機概論 3 75 ",
"必修 IM0059 乙 網頁程式設計 3 64 " ,
"選修 IM0069 甲 顧客關係管理 3 92 ",
"必修 IM0095 乙 資訊網路安全 3 37 ",
"必修 PE0Z0L 甲 體育(體適能) 0 86 ",
};
FILE* fp=fopen("score.xls","w");
for (int i=0; i<10; i++)
fprintf(fp,"%d\t%s\n",i,s[i]);
fclose(fp);
system("Pause");
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int main()
{
char s[10][40]={
"必修 GE0103A 中國通史 2 60",
"必修 IM0017 系統分析與設計 3 67",
"必修 IM0021 資料庫管理系統 3 60",
"必修 IM0022 資訊管理實務專題(一) 1 82",
"必修 IM0039 資訊管理講座(一) 1 63",
"必修 IM0044 會計學(一) 3 62",
"必修 IM0059 網頁程式設計 3 60",
"必修 IM0095 資訊網路安全 3 43",
"必修 PE0Z0L 體育(體適能) 0 85",
"選修 MD0030 經濟學(一) 3 60" ,
};
FILE* fp=fopen("score.xls","w");
for (int i=0; i<10; i++)
fprintf(fp,"%d\t%s\n",i,s[i]);
fclose(fp);
system("Pause");
return 0;
}
張貼留言