Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search Coderanch
Advance search
Google search
Register / Login
do pham
Greenhorn
+ Follow
1
Posts
0
Threads
0
Cows
since May 12, 2011
Merit badge:
grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
Ranch Hand Scavenger Hunt
Number Posts (1/100)
Number Threads Started (0/100)
Number Cows Received (0/5)
Number Likes Received (0/10)
Number Likes Granted (0/20)
Set bumper stickers in profile (0/3)
Report a post to the moderators (0/1)
Edit a wiki page (0/1)
Create a post with an image (0/2)
Greenhorn Scavenger Hunt
First Post
Number Posts (1/10)
Number Threads Started (0/10)
Number Likes Received (0/3)
Number Likes Granted (0/3)
Set bumper stickers in profile (0/1)
Set signature in profile
Search for a post/thread (0/3)
Set a watch on a thread
Save thread as a bookmark
Create a post with an image (0/1)
Recent posts by do pham
Multiplication Table
Hi everybody,
I'm a new user of this forum.
You can try my java file with Multiplication Table.
import java.text.MessageFormat; /** * Email: deleted * Multiplication Table * @author PHAM VAN DO */ public class Multable { void output() { int i, j; System.out.println("Multiplication Table - Designed by Do Pham"); for(i=2; i<=9; i++) { System.out.print(" " +i+ " "); } System.out.println(); for(i=1; i<=10; i++) { //row from 1 to 10 for(j=2; j<=9; j++) { //column from 2 to 9 Object[] test = {j, i, i*j}; if(i*j<10) { MessageFormat mf = new MessageFormat(" {0} * {1} = {2} "); System.out.print(mf.format(test)); } else { MessageFormat mf; if(i==10) { mf = new MessageFormat(" {0} *{1} = {2} "); } else { mf = new MessageFormat(" {0} * {1} = {2} "); } System.out.print(mf.format(test)); } } System.out.println(); } } public static void main(String args[]) { Multable test = new Multable(); test.output(); } }
show more
12 years ago
Beginning Java