A. | int |
B. | long |
C. | float |
D. | double |
Input (Integer, Integer) | Printed Output |
---|---|
Number = 1, Product = 6 | 6 |
Number = 2, Product = 3 | 1 3 |
Number = 3, Product = 24 | 1 1 24 |
Number = 3, Product = 12 | 1 1 12 |
Number = 2, Product = 72 | 1 72 |
class PrintPossibleAgesOfChildren
{ public static void main(String s[])
{
printPossibleAges(3, 24);
}
public static void printPossibleAges(int numberOfChildren, int productOfTheirAges) {
//Write a code here to print all the possible ages of children. Use System.out.println or System.out.print for printing.
}
//If required, write any additional methods here
}