WAP to print the following numbers 0,3,8,15,24,35,48,63 in java
Answers
Answered by
0
import java.util.*;
class D
{
public static void main(String args[])
{
int i,j=0;
int k=3;
for(i=1;i<=8;i++)
{
System.out.print(j+","+"");
j+=k;
k=k+2;
}
}
}
Answered by
0
Answer:-)
Hope this helps you....
PLEASE MARK ME AS BRAINLIEST.......
Attachments:
Similar questions
Social Sciences,
5 months ago
Math,
5 months ago
Math,
10 months ago
Science,
10 months ago
Geography,
1 year ago