j code example
Example 1: j
def hexConvert (x):
return int(x, base)
x = str(input("input value to convert to decimal: "))
base = int(input("Base of value to be converted to decimal: "))
print(x, " in base ", base, " = ", hexConvert(x), " in decimal")
Example 2: j
import java.util.*;
class cool
{
Scaner sc = new Scanner(System.in);
System.out.println("Enter a decimal");
double a = sc.nextDouble();
Systrem.out.println("The numver u enterd is " + a);
}