Computer Science, asked by swarakulkarnijan17, 1 day ago

Write a java program to generate first ten terms 1,3,5,7...

Answers

Answered by legendgamer01194
0

Explanation:

public class KboatSeries

{

public void generateSeries() {

int term = 1;

for (int i = 1; i <= 10; i++) {

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

term = term * 10 + 1;

}

}

}

Answered by shrihankp
0

Answer:

public class OddNum {

public void series(){

for (int n = 1; n < 10; n+= 2){

System.out.println(n);

}

}

}

Similar questions