I am beginner here..Please help me out..What is wrong with this Code TWONMS?

import java.util.*;

class TWONM{
public static void main(String args[]){
Scanner sc=new Scanner(System.in);
int A=1,B=1,N=1,C=1,D=1,max=0,min=0;
System.out.println("Enter TestCases");
int T=sc.nextInt();
if(T<=100 && T>=1){
for(int i=0;i<T;i++){
System.out.println("Enter Alice Number");
A=sc.nextInt();
if(A>=1 &&A <= 1000000000){
System.out.println("Enter Bob Number");
if( B>=1 && B <= 1000000000){
B=sc.nextInt();
System.out.println("Enter Number of Turns");
N=sc.nextInt();
if(N<=30){
for(int j=0;j<N;j++){
	if(j%2==0){
		System.out.println("Alice Turn");
		A=A*2;
	}
	else{
		B=B*2;
	}
}
if(A>=B){
	
	max=A;
	min=B;
}
else{
	max=B;
	min=A;
}
System.out.println("Integer Division is" +(max/min));
}
}
}
}
}
}

}
1 Like

One small advice. Try to give the link of the problem and your submission instead of pasting whole thing here

Can you read a code like that?Just think about it.Pls, format your code using CodeSample tool.