WAP to display series 1,2,4,7,11....,40
Answers
Answered by
0
Answer:
class Series {
public static void main(String[ ]
args);
int temp = 1;
int sum = 1;
while(sum!=40) {
System.out.println(sum);
sum+=temp;
temp++;
}
}
}
Similar questions