/* Display Triangle as follow
1
2 4
3 6 9
4 8 12 16 ... N (indicates no. of Rows) */
class Output{
public static void main(String args[]){
int n = Integer.parseInt(args[0]);
for(int i=1;i<=n;i++){
for(int j=1;j<=i;j++){
System.out.print((i*j)+" ");
}
System.out.print("n");
}
}
}
JAVA LEARNING:An art and entertainment for those who love it. For Online Assistance and help @email:Learnprogramm@gmail.com
Thursday, 28 April 2011
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment