Computer Science, asked by Rainbowgain, 3 months ago

write a program to print the series

1,3,6,10... upto 10 terms​

Answers

Answered by SilentWraith2678
0

Answer:

Umm, I am totally Not sure about the answer but maybe this may work..

In Java...

The difference increases by 1…

int d = 1;  

for(int i=1;i<50;i = d+i){  

 System.out.println(i);  

 d++;  

}

Since i=2 if you want to generate series of 10 numbers then length of series in loop condition should be 10+2.

Hope it helps...

Mark me as Brainliest and Have a Good day :>

Answered by Anisha5119
5

Answer:

import java.io.*;

.*;class Series

{

{public static void main()

{public static void main(){

int I,s=1;

for(I=1;I<=51;I++)

{

s=I+2;

System.out.println(s+",");

}

}

}

Similar questions