Posted by: Ayus March 2, 2011
Login in to Rate this Post:
0
?
Try this:{its in java but adjust it accordingly}
// it does work
public class Test {
public void Multiply(int a, int b){
int i;
System.out.println("\t");
for (i = a; i <= b; i++){
System.out.print(" "+" "+"\t"+i);}
System.out.print(" "+" "+"\n");
for (i = a; i <= b; i++){
System.out.print(i + "\t");
for (int j = a; j <= b; j++){
System.out.print(i * j+" " + "\t" +"");
}
System.out.print("\n");
}
}
}
public class testTest {
public static void main(String[] args){
Test t = new Test();
t.Multiply(7, 11);
}
}
// it does work
public class Test {
public void Multiply(int a, int b){
int i;
System.out.println("\t");
for (i = a; i <= b; i++){
System.out.print(" "+" "+"\t"+i);}
System.out.print(" "+" "+"\n");
for (i = a; i <= b; i++){
System.out.print(i + "\t");
for (int j = a; j <= b; j++){
System.out.print(i * j+" " + "\t" +"");
}
System.out.print("\n");
}
}
}
public class testTest {
public static void main(String[] args){
Test t = new Test();
t.Multiply(7, 11);
}
}
Last edited: 02-Mar-11 05:42 PM