#7 Java Loops II | Hackerrank Java Solutions

preview_player
Показать описание
Thanks if u r Watching us....
#Python #Dev19 #HackerankSolutions #C #C++ #Java #Python #C
Please Subscribe Us ....
Рекомендации по теме
Комментарии
Автор

I am unable to understand and write the code ..please explain anyone

Vikash-Official
Автор

sir mai etni practice kar rhi hu par hi nhi raha hai

tanyatiwari
Автор

I am near to 2 star this question is deficult to me

machinecode.
Автор

import java.util.*;
import java.io.*;

class Solution{
public static void main(String []argh){
Scanner in = new Scanner(System.in);
int t=in.nextInt();
for(int i=0;i<t;i++){
int a = in.nextInt();
int b = in.nextInt();
int n = in.nextInt();

int s=a+b;
for (int j = 1; j <= n; j++) {
System.out.print(s+" ");
s=s+(int)(Math.pow(2, j))*b;
}
System.out.println();
}
in.close();
}
}

RohitKumar-zpci
Автор

What is t here
What is "t" here??

josephsolomon