WRITE A PROGRAM TO DISPLAY FIRST 10 TERMS OF FOLLOWING
0,1,2,3,6 . . . . . . .. . . . . . . . . . . . . . . .
Answers
Answered by
1
class Main
{
public static void main (String[] args)
{
int i, sum=0;
for(i=1;i<=10;i++)
{
System.out.print(sum+" ");
sum = sum+i;
}
}
}
Similar questions