info@meritcampus.com    +91-85006-22255
...
`

Write a program to print the multiplication table until the product is less than 100.

Input (Integer) Printed Output
`2` `2 x 1 = 22 x 2 = 42 x 3 = 62 x 4 = 82 x 5 = 102 x 6 = 122 x 7 = 142 x 8 = 162 x 9 = 182 x 10 = 20`
`10` `10 x 1 = 1010 x 2 = 2010 x 3 = 3010 x 4 = 4010 x 5 = 5010 x 6 = 6010 x 7 = 7010 x 8 = 8010 x 9 = 90NOTE : (10 x 10 = 100) is not printed since the product 100 is not less than 100.`
`14` `14 x 1 = 1414 x 2 = 2814 x 3 = 4214 x 4 = 5614 x 5 = 7014 x 6 = 8414 x 7 = 98`
`20` `20 x 1 = 2020 x 2 = 4020 x 3 = 6020 x 4 = 80`

``` class PrintMultiplicationTableTill100 {     public static void main(String s[])    {        printMultiplicationTableTill100(12);    }     public static void printMultiplicationTableTill100(int input)     { ```
```     } } ```
Topic:

### User comments below.All of them might not be correct.

to print the table of a particular number we need to take a loop wich will chek whether the product is less than 100 or not.. for this firstly take a variable i=1 now... take while loop and the condition inside while loop will be -> while(input*i<100) so everytime the product is less than 100 it will enter into loop other wise it will exit.... now inside this loop... print ->> sop(input "*" i "="(input*i))....so the output will be printed in the desired frmat.... now increment the value of I by 1 as i  .....now exit loop

Posted by Asma Mujtaba Khan    2014-12-12 06:30:11

*take and for loop start loop control from from the 1 and put condition until it is <=10
*here check whether product is <100 or not...if it is <100 than print else break to come out of the loop..
*print it like this Sopln(input+"*"+i+"="+i*input)

Posted by Uday Kumar    2014-12-12 14:17:11

This dose is now closed and the winners are Asma Mujtaba Khan,  for 'First Correct Comment', Uday Kumar,  for 'Second Correct Comment'. The 'lucky liker' is Shubham Bansal. Please login into Merit Campus using facebook, to claim your recharge. Go to http://java.meritcampus.com/earnings to raise the recharge.

Posted by Merit Campus    2014-12-14 08:39:57