Computer Science, asked by Anonymous, 1 year ago

Write a program for the following series using Scanner class.

Attachments:

Answers

Answered by kakakakakkasfdg
0
public class Series
{
public static void main(String args[ ])
{
int a;
for(a=1;a<=5;a++)
{
s = s + 1/a;
}
System. out. println(" The sum of the series= " +a);
}
}
Similar questions