You are viewing a single comment's thread. Return to all comments →
class Solution{ public static void main(String []argh){ Scanner in = new Scanner(System.in); int t=in.nextInt(); int v=0; for(int i=0;i
for(int k=0;k<n;k++) { for(int j=0;j<=k;j++) v=v+a+(b*(2^j)); if(k!=n-1) System.out.print(v+" "); else{ System.out.print(v); } }System.out.println("\n"); v=0; } in.close(); }
}
//can you help me where i went wrong
Seems like cookies are disabled on this browser, please enable them to open this website
Java Loops II
You are viewing a single comment's thread. Return to all comments →
class Solution{ public static void main(String []argh){ Scanner in = new Scanner(System.in); int t=in.nextInt(); int v=0; for(int i=0;i
}
//can you help me where i went wrong