My issue
not able to understand where the code is failing
My code
import java.util.*;
class income{
public static void main(String[]args){
Scanner read= new Scanner(System.in);
int t= read.nextInt();
for(int i=0;i<t;i++){
int n=read.nextInt();
int x=read.nextInt();
double a= Math.pow(2,x);
double b= Math.pow(2,n);
double saving= a/b;
System.out.println(saving);
}
}
}
Learning course: Solve Programming problems using Java
Problem Link: CodeChef: Practical coding for everyone