do this fast
urget plss send fast
Answers
Answer:
4567 number is odd one so it is odd one
import java.util.*;
class MAIN
{
public static void main(String args[])
{
Scanner sc = new Scanner(System.in);
String n;
int i,l,sum=0;
System.out.println("Enter a number:");
n = sc.nextLine();
l = n.length();
if (l >= 3)
{
if (l == 3)
System.out.print(n.charAt(l-2));
else
for (i=1;i<l-2;i++)
{
sum = sum + Character.getNumericValue(n.charAt(i));
System.out.print(n.charAt(i)+"+");
}
sum = sum + Character.getNumericValue(n.charAt(l-2));
System.out.print(n.charAt(l-2)+"="+sum);
}
else
System.out.println("Wrong number");
}
}