a002.
簡易加法
| From: [120.119.77.179] |
發表日期
:
2010-12-24 13:58
import java.io.*;
public class Add {
public static void main(String[] args) throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int a,b,k;
System.out.println("數值A");
System.out.println("-");
str = br.readLine();
a = Integer.parseInt(str);
System.out.println("數值B");
System.out.print("-");
str = br.readLine();
b = Integer.parseInt(str);
for(int i=1;i<=k;i++){
for(int j=1;j<=k;j++){
k= a+b;
}
}
System.out.println("總和"+k);
}
}