Computer Science, asked by Anonymous, 1 year ago

Write program for the following sum series.

Attachments:

Answers

Answered by kakakakakkasfdg
1
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