1. Engineering
  2. Computer Science
  3. data structure java...

Question: data structure java...

Question details

Data structure - java

Question 02: Converting Decimal to Base n. . Read the programs ConversionBase1.java and ConversionBase2.java .Complete the program ConversionBase1.java to convert a given decimal value to the base n using Recursion. . Complete the program ConversionBase2.java to convert a given decimal value to the base n using linked list. -.-ConversionBase2.iava import java.util public class ConversionBase21 public static void main(Stringll args) Scanner stdinnew Scanner(System.in); System.out.println(Enter a positive integer:); int nstdin.nextlnt); System.out.println(Enter the base (2 to 16):) int m = stdin.nextlnt(); System.out.println(The base m + representation of + n+ isdecimalToBaseM(n, m)); static String decimalToBaseM(int n, int m) Stack stack- new Stack); String digitChar 0123456789ABCDEF l/to be completed by the student

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution