Axis bank question
Axis bank question
Q) public class HelloWorld{
public static void main(String []args){
String a = "programming";
String b = "ra";
char [] n = a.toCharArray();
char [] m = b.toCharArray();
for(int i = 0 ;i<a.length();i++){
for(int j = 0;j<b.length();j++){
if(n[i]==m[j]){
i++;
}
}
System.out.print(n[i]);
}
}
}
Ans of flow chart
k = 1,4,9,6,5,6
p = 1,4,6,6,0,0
check the reminder which is the last term in this case 0 that's why 0 % 10 means no remainder remaining ans 0
Ans of 1Q)
sum = 1 , 3 , 5 ,
c = c
sn = n(n+1)/2
we have to find the sum of the nth term
formula = sm = n(n+1)/2;
Comments
Post a Comment