Write the separate programs in Java to display the first ten terms of the following series: (a) 0, 1, 2, 3, 6

Answers 1

public class KboatSeries

{

public void generateSeries() {

int term = 0;

System.out.print(term);

for (int i = 3; i < 20; i = i + 2) {

term += i;

System.out.print(", " + term);

}

}

}

0,3,8,15,24,35,48,63,80,99

If you know the answer add it here!

Can't find the answer?

Log in with Google

or

Forgot your password?

I don't have an account, and I want to Register

Choose a language and a region
How much to ban the user?
1 hour 1 day 100 years