Computer Science, asked by Navena2310, 1 year ago

how to print 2,5,10,17 in java using for loop

Answers

Answered by darshan32
1

int d;

for(int i=1;i<18;i++)
{
d=i*i+1;
System. out. print(d+",");
}
Similar questions