top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Write a java program to count unique digits in number?

+1 vote
1,504 views

Write a java program to count unique digits in the number, if a given number is 393 it should return 2 since only 3,9 are unique digits?

posted May 21, 2018 by anonymous

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
+2 votes

Rohit wants to add the last digits of two given numbers.
For example, If the given numbers are 267 and 154, the output should be 11.

Below is the explanation -
Last digit of the 267 is 7
Last digit of the 154 is 4
Sum of 7 and 4 = 11

Write a program to help Rohit achieve this for any given two numbers.

Note: The sign of the input numbers should be ignored. i.e.
if the input numbers are 267 and 154, the sum of last two digits should be 11
if the input numbers are 267 and -154, the sum of last two digits should be 11
if the input numbers are -267 and 154, the sum of last two digits should be 11
if the input numbers are -267 and -154, the sum of last two digits should be 11

0 votes

import java.io.*
import java.util.*;
class UserMainCode
{
public static long output1;
public static void lastTwoDigitSum(int input1)
{}
}
in this format
plzz someone solve my problem

...