Posts

Showing posts from October, 2017

Number Count and Printing Numbers without Repeated/Duplicates numbers in JAVA .

PROBLEM : You have to count how many non-repeated/no duplicate numbers in a given set or range. You also have to print thosenumbers. INPUT EXAMPLE: How many digits you want to test(RANGE)? --->  5 Please input value = 1 Please input value = 3 Please input value = 2 Please input value = 1 Please input value = 3 OUTPUT EXAMPLE :  1 3 2 Total 3 Numbers HERE IS THE CODE : import java.util.Scanner; public class Pro_duplicateArray{       public static void main (String[] args){             Scanner keyboard = new Scanner (System.in);             System.out.println("How many digits you want to test(RANGE)?");             int range = keyboard.nextInt();                                               ...