Write a JavaScript program using function to find out whether a number is a palindrome or not. The console must display ‘The number is a palindrome’ if it is a palindrome otherwise it must display ‘The number is not a palindrome’.
Answers
Answer:
I don't know what's the formaula so in place of formula I will write "(Form.)" and also don't know wter by which no. it will be greater and by which no. it will be smaller so I will write cond. for condition in place of it .
Explanation:
import java.util.scanner;
public class <the name of the program>
{
Public static void main(string args [ ])
{
float N1;
float N2;
float Tot;
System.out.println("Hello and welcome to the calci");
System.out.println("please enter a valid number so that you can calculatethe palindrom");
System.out.println("please enter the first no:")
N1=input.next float();
system.out.println("enter next number:");
N2=input.next float();
Tot=(form.);
If (Tot==(cond.);
{
System.out.println("It is a palindrom");
}
else (Tot==(cond.);
{
System.out.println("It is not A palindrom");
}
}
}
Remeber to add the formula at place of form.and also remeber to add condition in place of cond.