Instructions A Write compile and run a Java program that 1 u
Instructions:
A. Write, compile, and run a Java program that: (1) uses a single line comment to
document your source code with your name and section number. This should be the
very first line of your program, (2) prints your name and section number as the first line
of your output, (3) prompts the user to enter a number, its base(b), and base to be
converted to(a), (4) reads these inputs from the keyboard and stores the number in a
String \"num\", base b in int \"b\", base a in int \"a\". (5) uses iteration to calculate the
conversion of numb, to numa (6) uses iteration to calculate the conversion of numbto
numa (7) prints the inputs num, b, and a the values of the conversions in appropriately
formatted and informative manner.
The real challenge of this lab exercise is to minimize the lines of code necessary to
solve the problem. DO NOT USE RECURSION!!
Solution
1)/* name , section number*/
2)
System.out.println(\"enter number \");
scanner numa=in.nextIn(system.in);
System.out.println(\"enter the base of number \");
scanner basea=in.nextInt(system.in);
system.out.println(\"enter the base to be converted \");
scanner baseb=in.nextInt(system.in);

