NOTE: PLEASE ADD A COMMENT LINE OF MY CODE OR EXPLANATION LINE THANK YOU!
public class StackTest{
static public void main(String... args){
MyStack stack = new MyStackArray();
System.out.print("ENTER AN INTEGER VALUE(n): ");
int dec = new java.util.Scanner(System.in).nextInt();
stack.push(dec %2);
dec/=2;
while(dec!=0)
{
}
System.out.print("Decimal to Binary :");
while(!(stack.isEmpty())){
System.out.print(stack.pop());
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here