Input (Integer) | Printed Output |
---|---|
4 | 1,1,2,3, |
7 | 1,1,2,3,5,8,13, |
12 | 1,1,2,3,5,8,13,21,34,55,89,144, |
class PrintFibanocciSeries
{ public static void main(String s[])
{
fibanocciSeries(7);
}
public static void fibanocciSeries(int size)
{
//Write code here to print Fibanocci series depending upon the size. Use System.out.println or System.out.print for printing.
}
}
Input (Integer) | Printed Output |
---|---|
4 | * |
5 | * |
6 | * |
class PrintFormation
{ public static void main(String s[])
{
printFormation(5);
}
public static void printFormation(int size)
{
//Write code here to print the required formation depending upon the size. Use System.out.println or System.out.print for printing.
}
}
Input (Integer) | Printed Output |
---|---|
4 | * |
5 | * |
6 | * |
class PrintFormation
{ public static void main(String s[])
{
printFormation(5);
}
public static void printFormation(int size)
{
//Write code here to print the required formation depending upon the size. Use System.out.println or System.out.print for printing.
}
}
Input (Integer) | Output (Boolean) |
---|---|
121 | true |
123 | false |
7887 | true |
90009 | true |
90010 | false |
class PalindromeNumber
{ public static void main(String s[])
{
boolean palindrome = isPalindrome(1221);
if(palindrome)
System.out.println("1221 is a palindrome.");
else
System.out.println("1221 is not a palindrome.");
}
public static boolean isPalindrome(int number)
{
boolean result = false;
//Write code here to find if the number is palindrome and assign it to result.
return result;
}
}
Input (Integer) | Output to be printed (Spaces before and after 'x' and '=' are also important in the output) |
---|---|
4 |
|
5 |
|
class MultiplicationTable
{ public static void main(String s[])
{
printMultiplicationTable(5);
}
public static void printMultiplicationTable(int number)
{
//Write code here to print the required multiplication table of the number. Use System.out.println or System.out.print for printing.
}
}