tag:blogger.com,1999:blog-3994600705300849450.post8495612295070170401..comments2023-11-02T05:01:46.205-07:00Comments on 程式設計工藝大師(Master of Computer Programming): Java 第五週許志宇(Chih-Yu Hsu)http://www.blogger.com/profile/10096107829485385586noreply@blogger.comBlogger12125tag:blogger.com,1999:blog-3994600705300849450.post-52868561744276613582009-03-20T02:59:00.000-07:002009-03-20T02:59:00.000-07:00//光電四D9427925施宇鴻import java.util.StringTokenizer;i...//光電四D9427925施宇鴻<BR/><BR/><BR/>import java.util.StringTokenizer;<BR/><BR/>import java.io.*;<BR/><BR/>class Myfifthjava <BR/>{<BR/> public static void main(String[] args)<BR/>{<BR/> int num;<BR/> num=1;<BR/> String InputFile,OutFile;<BR/> InputFile=args[0];<BR/> System.out.println("InputFileName"+InputFile);<BR/><BR/><BR/> StringTokenizer st = new StringTokenizer(InputFile,".");<BR/><BR/> //while (st.hasMoreTokens()) {<BR/> //System.out.println(st.nextToken());<BR/> OutFile=st.nextToken()+".w"+st.nextToken();<BR/> System.out.println("OutFileName"+OutFile);<BR/>// }<BR/><BR/>File position=new File(InputFile);<BR/><BR/>try{ <BR/>BufferedReader input = new BufferedReader(new FileReader( position ) );<BR/>num = Integer.parseInt(input.readLine());<BR/>System.out.println(num);<BR/><BR/><BR/>}<BR/>catch(Exception e)<BR/>{ <BR/>System.out.println("Error:"+e); <BR/><BR/>}<BR/>int allsum;<BR/>allsum=1;<BR/><BR/>for(int j=1; j<=num ; j++)<BR/>{<BR/><BR/>allsum = allsum*j;<BR/><BR/>System.out.println(allsum);<BR/>}<BR/><BR/>}<BR/>}Ataraxiahttps://www.blogger.com/profile/16929916304047152420noreply@blogger.comtag:blogger.com,1999:blog-3994600705300849450.post-68389402309668250732009-03-20T02:49:00.000-07:002009-03-20T02:49:00.000-07:00//應數三甲 D9538864 徐晟哲import java.io.*;import java.ut...//應數三甲 D9538864 徐晟哲<BR/>import java.io.*;<BR/>import java.util.StringTokenizer;<BR/>class Myfourjava<BR/>{<BR/>public static void main(String[] args)<BR/>{<BR/>String InputFile,OutFile;<BR/>int num=0,sumall=1;<BR/>InputFile=args[0];<BR/>System.out.println("InputFileName"+InputFile);<BR/><BR/>StringTokenizer st = new StringTokenizer(InputFile ,"." );<BR/> OutFile=st.nextToken()+".w"+st.nextToken();<BR/> System.out.println("OutputFilename"+OutFile);<BR/>File position=new File(InputFile);<BR/>try{<BR/>BufferedReader input=new BufferedReader(new FileReader(position));<BR/>num =Integer.parseInt(input.readLine());<BR/>System.out.println(num);<BR/>}<BR/>catch(Exception e){<BR/>System.out.println("Error"+e);<BR/>}<BR/><BR/><BR/>for(int j=1;j<=num;j++)<BR/>{<BR/>sumall=sumall*j;<BR/><BR/><BR/>System.out.println(sumall);<BR/>}<BR/><BR/><BR/>}<BR/>}乃爸https://www.blogger.com/profile/11408687057426709045noreply@blogger.comtag:blogger.com,1999:blog-3994600705300849450.post-55099132932863766582009-03-20T02:46:00.000-07:002009-03-20T02:46:00.000-07:00//D9582506 黃鉦權import java.util.StringTokenizer;imp...//D9582506 黃鉦權<BR/>import java.util.StringTokenizer;<BR/>import java.io.*; <BR/>class Myfirstjava<BR/>{<BR/>public static void main(String[] args)<BR/>{<BR/>String Inputfile,OutFile;<BR/>int num=0,sumall=1;<BR/>Inputfile=args[0];<BR/>File position=new File(Inputfile);<BR/>System.out.println("InputFileName"+Inputfile);<BR/>StringTokenizer st = new StringTokenizer(Inputfile,".");<BR/> <BR/> //System.out.println(st.nextToken());<BR/><BR/>OutFile=st.nextToken( )+".w"+st.nextToken();<BR/><BR/>System.out.println("OutputFileName"+OutFile);<BR/> try{<BR/>BufferedReader input = new BufferedReader(new FileReader( position ) );<BR/>num = Integer.parseInt(input.readLine());<BR/>System.out.println(num);<BR/>}<BR/><BR/>catch(Exception e)<BR/>{<BR/>System.err.println(e);<BR/>}<BR/>for(int j=1;j<=num;j++)<BR/>{<BR/>sumall=sumall*j;<BR/><BR/>System.out.println(sumall);<BR/>}<BR/>}<BR/>}黃鉦權https://www.blogger.com/profile/11843282869775232429noreply@blogger.comtag:blogger.com,1999:blog-3994600705300849450.post-56900197839561587202009-03-20T02:45:00.000-07:002009-03-20T02:45:00.000-07:00import java.util.StringTokenizer;import java.io.*;...import java.util.StringTokenizer;<BR/>import java.io.*;<BR/>class Myfifthjava<BR/>{<BR/>public static void main(String[] args)<BR/>{<BR/>String InputFile,OutFile;<BR/>int num=0;<BR/>int sumall=1;<BR/>InputFile=args[0];<BR/>System.out.println("InputFileName"+InputFile);<BR/><BR/>StringTokenizer st = new StringTokenizer(InputFile,".");<BR/>OutFile=st.nextToken()+".w"+st.nextToken();<BR/>System.out.println("OutputFileName:"+OutFile); <BR/>File position= new File(InputFile);<BR/>try{<BR/>BufferedReader input = new BufferedReader(new FileReader( position ) );<BR/>num = Integer.parseInt(input.readLine());<BR/>System.out.println(num); <BR/>}<BR/>catch(Exception e)<BR/>{ <BR/>System.out.println("Error:"+e); <BR/>}<BR/><BR/>for(int j=1; j<=num ; j++)<BR/>{<BR/>sumall=sumall*j;<BR/>System.out.println(sumall);<BR/>}<BR/>}<BR/>}益銘梁https://www.blogger.com/profile/08658774514868410414noreply@blogger.comtag:blogger.com,1999:blog-3994600705300849450.post-11707342610034498542009-03-20T02:43:00.001-07:002009-03-20T02:43:00.001-07:00/*D9582256 高岱群 */import java.util.StringTokenizer;.../*D9582256 高岱群 */<BR/>import java.util.StringTokenizer;<BR/>import java.io.File;<BR/>import java.io.BufferedReader;<BR/>import java.io.FileReader;<BR/>class ra1<BR/>{<BR/>public static void main(String[] args)<BR/>{<BR/>int num=0,sumall=1;<BR/>String Inportfile,Outfile;<BR/>Inportfile=args[0];<BR/>StringTokenizer st = new StringTokenizer(Inportfile,".");<BR/>Outfile=st.nextToken()+".w"+st.nextToken();<BR/>System.out.println("Inportfile:"+Inportfile);<BR/>System.out.println("Outfile:"+Outfile);<BR/><BR/>File position=new File(Inportfile);<BR/>try<BR/>{<BR/>BufferedReader input = new BufferedReader(new FileReader( position ) );<BR/>num = Integer.parseInt(input.readLine());<BR/>System.out.println(num);<BR/>}<BR/>catch(Exception e)<BR/>{<BR/>System.out.println("ERRER:"+e);<BR/>}<BR/>for (int i=1; i<=num; i++)<BR/>{<BR/>sumall=sumall*i;<BR/>System.out.println(sumall);<BR/>}<BR/>}<BR/>}radropshttps://www.blogger.com/profile/18114610781414771700noreply@blogger.comtag:blogger.com,1999:blog-3994600705300849450.post-63786317808279327592009-03-20T02:43:00.000-07:002009-03-20T02:43:00.000-07:00*D9788173 王則元*/import java.util.StringTokenizer;im...*D9788173 王則元*/<BR/>import java.util.StringTokenizer;<BR/>import java.io.File;<BR/>import java.io.BufferedReader;<BR/>import java.io.FileReader;<BR/><BR/>class Myfifthjava<BR/>{<BR/>public static void main(String [] args)<BR/>{<BR/>int num=0,summation=1;<BR/>String InputFile,OutputFile;<BR/>InputFile=args[0];<BR/>System.out.println("InputFileName:"+InputFile);<BR/><BR/>StringTokenizer st = new StringTokenizer(InputFile, ".");<BR/><BR/>OutputFile=st.nextToken()+".w"+st.nextToken();<BR/>System.out.println("OutputFileName:"+OutputFile);<BR/><BR/>File position = new File(InputFile);<BR/><BR/><BR/>try<BR/>{<BR/>BufferedReader input = new BufferedReader(new FileReader( position ) );<BR/>num = Integer.parseInt(input.readLine());<BR/><BR/>System.out.println(num);<BR/><BR/>}<BR/><BR/>catch(Exception e)<BR/>{<BR/>System.out.println("Error:"+e);<BR/>}<BR/>for(int j=1; j<=num ; j++)<BR/>summation=summation*j;<BR/>{<BR/>System.out.println(summation);<BR/>}<BR/>}<BR/>}王則元https://www.blogger.com/profile/04083235685828450258noreply@blogger.comtag:blogger.com,1999:blog-3994600705300849450.post-17308513604944681752009-03-20T02:42:00.001-07:002009-03-20T02:42:00.001-07:00D9476995 應數四乙 辛為儒 import java.util.StringTokenizer...D9476995 應數四乙 辛為儒 <BR/><BR/><BR/>import java.util.StringTokenizer;<BR/>import java.io.*;<BR/>class java5<BR/>{<BR/> public static void main(String[] args)<BR/> {<BR/> int num = 0,sumall=1;<BR/> String InputFile,OutputFile;<BR/> InputFile = args[0];<BR/> System.out.println("InputFileName is "+InputFile);<BR/> <BR/> StringTokenizer st = new StringTokenizer(InputFile,".");<BR/> <BR/> <BR/> OutputFile = st.nextToken() + ".w" + st.nextToken();<BR/> <BR/> System.out.println("OutputFileName is " + OutputFile);<BR/><BR/> File position = new File(InputFile);<BR/> try{<BR/> BufferedReader input = new BufferedReader(new FileReader(position));<BR/> num = Integer.parseInt(input.readLine());<BR/> System.out.println(num);<BR/> }<BR/> catch(Exception e)<BR/> {<BR/> System.out.println("Error"+e);<BR/> }<BR/><BR/><BR/><BR/> for (int j=1; j <= num; j++)<BR/> {<BR/> sumall = sumall * j;<BR/> System.out.println(sumall);<BR/><BR/> }<BR/> }<BR/><BR/><BR/><BR/><BR/><BR/> }儒https://www.blogger.com/profile/14660857513968548993noreply@blogger.comtag:blogger.com,1999:blog-3994600705300849450.post-47648557822014176722009-03-20T02:42:00.000-07:002009-03-20T02:42:00.000-07:00//第五週作業 D9539125 黃培熏import java.io.*;import java.u...//第五週作業 D9539125 黃培熏<BR/>import java.io.*;<BR/>import java.util.StringTokenizer;<BR/><BR/>class HPS_005<BR/>{<BR/>public static void main(String[] args)<BR/>{<BR/>int num=1,sum=1;<BR/>String InputFileName=args[0], OutputFileName="";<BR/>File position = new File(InputFileName);<BR/>System.out.println(InputFileName);<BR/>StringTokenizer st = new StringTokenizer( InputFileName, ".");<BR/>OutputFileName+=st.nextToken()+".txt";<BR/>System.out.println(OutputFileName);<BR/><BR/>try<BR/>{<BR/>BufferedReader input = new BufferedReader(new FileReader( position ) );<BR/>num = Integer.parseInt(input.readLine());<BR/>System.out.println(num);<BR/>for (int i=num;i>=1;i--)<BR/>{<BR/>if (i==0)<BR/>sum*=1;<BR/>else<BR/>sum*=i;<BR/>System.out.println(sum);<BR/>}<BR/>System.out.println("sum="+sum);<BR/>}<BR/>catch(Exception e)<BR/>{<BR/>System.out.println("Error:"+e);<BR/>}<BR/>}<BR/>}HPShttps://www.blogger.com/profile/06746558852621923053noreply@blogger.comtag:blogger.com,1999:blog-3994600705300849450.post-73523933928396646322009-03-20T02:41:00.001-07:002009-03-20T02:41:00.001-07:00/*d9582608*//*廖仁龍*/import java.util.StringTokenize.../*d9582608*/<BR/>/*廖仁龍*/<BR/>import java.util.StringTokenizer;<BR/>import java.io.*;<BR/>class dark5<BR/>{<BR/>public static void main(String [] args)<BR/>{<BR/>int num = 0,sumall=1;<BR/>try<BR/>{<BR/>String InputFile,OutputFile;<BR/>InputFile = args[0];<BR/>System.out.println("InputFile="+InputFile);<BR/>StringTokenizer st = new StringTokenizer(InputFile,".");<BR/>OutputFile =st.nextToken()+".w"+st.nextToken();<BR/>System.out.println("OutputFile="+OutputFile);<BR/>File position = new File (InputFile);<BR/><BR/>BufferedReader input = new BufferedReader(new FileReader( position ) );<BR/>num = Integer.parseInt(input.readLine());<BR/>System.out.println(num);<BR/>}<BR/>catch(Exception e)<BR/>{<BR/>System.out.println("你錯啦笨蛋="+e);<BR/>}<BR/>for(int j=1; j<=num ; j++)<BR/>{<BR/>sumall=sumall*j;<BR/>System.out.println(sumall);<BR/>}<BR/>}<BR/>}dragonhttps://www.blogger.com/profile/10698843650771029982noreply@blogger.comtag:blogger.com,1999:blog-3994600705300849450.post-90397859611371796742009-03-20T02:41:00.000-07:002009-03-20T02:41:00.000-07:00/*D9476668 陳秋宇*/import java.util.StringTokenizer;i.../*D9476668 陳秋宇*/<BR/><BR/><BR/>import java.util.StringTokenizer;<BR/>import java.io.BufferedReader;<BR/>import java.io.FileReader;<BR/>import java.io.File;<BR/><BR/>class Myfirstjava<BR/>{<BR/>public static void main(String[] args)<BR/>{<BR/>String InputFile,OutFile;<BR/>int num=0,sumall=1;<BR/>InputFile=args[0];<BR/>System.out.println("InputFilename"+InputFile);<BR/>StringTokenizer st = new StringTokenizer(InputFile,".");<BR/><BR/>OutFile=st .nextToken()+".w"+st .nextToken();<BR/>System.out.println("OutputFilename"+OutFile);<BR/><BR/>File position = new File(InputFile);<BR/>try{<BR/>BufferedReader input = new BufferedReader(new FileReader( position ) );<BR/> num = Integer.parseInt(input.readLine());<BR/>System.out.println(num);<BR/>}<BR/>catch(Exception e){<BR/>System.out.println("錯誤:"+e);<BR/>}<BR/>for(int j=1; j<=num ; j++)<BR/><BR/>{<BR/>sumall=sumall*j;<BR/>System.out.println(sumall);<BR/>}<BR/><BR/>}<BR/>}Unknownhttps://www.blogger.com/profile/05523244086537760271noreply@blogger.comtag:blogger.com,1999:blog-3994600705300849450.post-75055989244396281872009-03-20T02:39:00.000-07:002009-03-20T02:39:00.000-07:00D9377831 劉羽程---------------------------------impor...D9377831 劉羽程<BR/>---------------------------------<BR/>import java.io.*; <BR/>import java.util.*;<BR/>import java.util.StringTokenizer;<BR/>class myfifthjava<BR/>{<BR/>public static void main(String[] args)<BR/>{<BR/>int num=0,sumall=1;<BR/>String InputFile,OutputFile;<BR/>InputFile=args[0];<BR/>System.out.println("InputFilename:"+InputFile);<BR/><BR/>StringTokenizer st = new StringTokenizer(InputFile,".");<BR/>OutputFile=st.nextToken()+".w"+st.nextToken();<BR/>System.out.println("OutputFilename:"+OutputFile);<BR/><BR/>File position = new File(InputFile);<BR/><BR/>try<BR/>{<BR/>BufferedReader input = new BufferedReader(new FileReader( position ) );<BR/>num = Integer.parseInt(input.readLine());<BR/>System.out.println(num);<BR/>}<BR/>catch(Exception e)<BR/>{<BR/>System.out.println("Error:"+e);<BR/>}<BR/>for(int j=1; j<=num; j++)<BR/>{<BR/>sumall= sumall*j ;<BR/>System.out.println(sumall);<BR/>}<BR/>}<BR/>}程https://www.blogger.com/profile/14142949769979347640noreply@blogger.comtag:blogger.com,1999:blog-3994600705300849450.post-58755804898294129922009-03-20T02:38:00.000-07:002009-03-20T02:38:00.000-07:00/*D9539108 陸靖文*/import java.util.StringTokenizer;i.../*D9539108 陸靖文*/<BR/>import java.util.StringTokenizer;<BR/>import java.io.*;<BR/><BR/>class FB {<BR/>public static void main (String[] args) {<BR/><BR/>String InputFile, OutputFile;<BR/>int num=0,multi=1;<BR/><BR/>InputFile=args[0];<BR/><BR/>System.out.println("輸入名稱:"+InputFile);<BR/><BR/>StringTokenizer st=new StringTokenizer(InputFile,".");<BR/><BR/>OutputFile=st.nextToken()+".w"+st.nextToken();<BR/><BR/>System.out.println("輸出名稱:"+OutputFile);<BR/><BR/>try{<BR/>BufferedReader input = new BufferedReader(new FileReader(InputFile ) );<BR/>num = Integer.parseInt(input.readLine());<BR/>System.out.println(num);<BR/>}<BR/>catch(Exception e){<BR/>System.out.println("錯誤訊息:"+e);<BR/>}<BR/><BR/>for(int j=1; j<=num ; j++){<BR/><BR/>multi*=j;<BR/>System.out.println("做第幾次:"+j);<BR/>System.out.println(j+"階乘="+multi);<BR/><BR/>}<BR/>}<BR/>}BBBhttps://www.blogger.com/profile/17083313806490533730noreply@blogger.com