- public class App {
- public void printMultiplicationTable(int table,int end){
- int val=table;
- int i=1;
- System.out.println(i+":"+val);
- end++;
- for(i=2;i<end;i++){
- val+=table;
- System.out.println(i+":"+val);
- }
- }
- public static void main(String[] args) {
- App app=new App();
- app.printMultiplicationTable(1,10);
- app.printMultiplicationTable(2,10);
- app.printMultiplicationTable(3,10);
- app.printMultiplicationTable(4,10);
- }
- }
Indlæg senest redigeret d. 15.12.2008 19:10 af Bruger #5620