- Dec 23 Mon 2013 08:49
-
高三個人申請第二階段個人資料上傳之審查資料製作小提示
- Sep 30 Mon 2013 09:39
-
102學年度高三第一次線上測試
線上測驗
- Oct 30 Tue 2012 22:47
-
c++ 開關檔-產生成績單
//感謝李奕快速支援^^ 想要什麼,許個願就有~oh ya
#include<iostream>
#include<fstream> //opening file,you should include this!!
#include<string> //for name
#include<iomanip> //for setw and left want more? try cplusplus.com
using namespace std;
int main()
{
ifstream fin("input.txt"); //ifstream is a type for input file, fin is a name like cin
ofstream fout("output.txt");
string name;
int score[5];
fout<<"姓名 國文 數學 社會 自然 英文" <<endl;
while(!fin.eof()) //eof: end of file, the most important function when reading files
{
fin>>name; //use fin like use cin
for(int i=0;i<5;i++)
{
fin>>score[i];
}
fout<<setw(10)<<left<<name; //setw: set width, you can control the space without fout<<" ";
for(int i=0;i<5;i++)
{
fout<<setw(5)<<left<<score[i];
}
fout<<endl; //==fout<<"\n";
}
//system("PAUSE");
}
#include<iostream>
#include<fstream> //opening file,you should include this!!
#include<string> //for name
#include<iomanip> //for setw and left want more? try cplusplus.com
using namespace std;
int main()
{
ifstream fin("input.txt"); //ifstream is a type for input file, fin is a name like cin
ofstream fout("output.txt");
string name;
int score[5];
fout<<"姓名 國文 數學 社會 自然 英文" <<endl;
while(!fin.eof()) //eof: end of file, the most important function when reading files
{
fin>>name; //use fin like use cin
for(int i=0;i<5;i++)
{
fin>>score[i];
}
fout<<setw(10)<<left<<name; //setw: set width, you can control the space without fout<<" ";
for(int i=0;i<5;i++)
{
fout<<setw(5)<<left<<score[i];
}
fout<<endl; //==fout<<"\n";
}
//system("PAUSE");
}
- Oct 30 Tue 2012 12:17
-
c++檔案處理
讀一個檔inf.txt將內文中的數字全部相加起來然後再將結果輸出至outf.txt
#include<iostream>
#include<fstream>
using namespace std;
#include<iostream>
#include<fstream>
using namespace std;
- Sep 06 Tue 2011 11:37
-
100學年度資訊科技概論進度表暨學生分組
- Aug 12 Fri 2011 16:07
-
100學年度資訊學科能力競賽-校內初賽
1.請寫一程式,讀入user由鍵盤輸入的一行文字,將這一行文字中的數字相加後輸出.
輸入:adkl2eongoelnb34djlqpi52djpot224dk;a56aljs90jd;ajf;7djljsoeuor88ewpori
- Aug 09 Tue 2011 16:55
-
c++ 之函式呼叫及遞迴
計算階乘!
#include<iostream.h>
int level(int n);
int main()
{
int a;
cout<<"請輸入要求的階乘數:";
cin>>a;
cout<<"其階乘數為:"<<level(a)<<endl; /*傳值呼叫
system("PAUSE");
}
#include<iostream.h>
int level(int n);
int main()
{
int a;
cout<<"請輸入要求的階乘數:";
cin>>a;
cout<<"其階乘數為:"<<level(a)<<endl; /*傳值呼叫
system("PAUSE");
}
- Aug 09 Tue 2011 15:56
-
c++之結構struct
- Aug 09 Tue 2011 15:25
-
c++之陣列array
- Aug 08 Mon 2011 09:56
-
將Scratch檔案輸出成exe執行檔--「ChirpCompiler」
Scratch可以免費下載,同學們也可以在家中下載及安裝後,完成老師指定的作業. Scratch的檔案副檔名為sb,如果想和朋友分享你的作品,而他沒有安裝Scratch軟體.這個檔案是打不開的~ 在分享前我們可先使用「ChirpCompiler」軟體,將sb檔轉換為可執行檔(exe),再將轉換後的執行檔分享給朋友。
- Aug 04 Thu 2011 14:36
-
photoimpact 去背
- Aug 03 Wed 2011 14:52
-
scratch 打地鼠


