You are viewing a single comment's thread. Return to all comments →
public static void main(String[] args) throws IOException { int[][] mint=new int[100][3];
Scanner scanner1 =new Scanner(System.in); int q =scanner1.nextInt(); for (int i=0; i<q;i++){ mint[i][0]=scanner1.nextInt(); mint[i][1]=scanner1.nextInt(); mint[i][2]=scanner1.nextInt(); } scanner1.close(); for (int i=0; i<q;i++){ int sonuc=mint[i][0]; int us=1; for (int j=0; j<mint[i][2];j++){ int b= us*mint[i][1]; sonuc=(sonuc+b); System.out.print(sonuc+" "); us*=2; } System.out.println(); } }
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 →
public static void main(String[] args) throws IOException { int[][] mint=new int[100][3];