close

import java.io.*;
import java.util.*;
import java.math.BigInteger;


class TestReadWrite
{

public static void main(String[] args)
{

String OutFileName;


try
{
FileReader inputjerry=new FileReader("inputtext.txt");


String line;
BufferedReader binputjerry=new BufferedReader(inputjerry);
line=binputjerry.readLine();
StringTokenizer stline=new StringTokenizer(line, " ");


String a,b;
a=stline.nextToken();
b=stline.nextToken();

//System.out.println(a);
//System.out.println(b);
BigInteger bi3;
BigInteger bi1 = new BigInteger(a);
BigInteger bi2 = new BigInteger(b);
bi3 = bi1.add(bi2);
System.out.println(bi3);

OutFileName = "TestReadWrite.sw01" ;
//System.out.println(OutFileName);

File myfile=new File(OutFileName);
myfile.createNewFile();

FileOutputStream fos = new FileOutputStream(myfile);
PrintStream ps = new PrintStream (fos);
ps.print(bi1+"+"+bi2+"="+bi3);


}
catch(Exception e)
{
System.out.println("Exception");
}
}
}

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 ann9999963 的頭像
    ann9999963

    pon~pon~部落閣

    ann9999963 發表在 痞客邦 留言(0) 人氣()