write a program to print the following series:2,5,10,........ . .. ....82
Answers
Answered by
1
Kon se language me likhna h
mercy2:
programming language
Answered by
1
public class Print
{
public static void main(String[]args)
{
int num=1;
for (int i=1;i<=18;i=i+2)
{
num=num+i;
System.out.print(" " +num);
}
}
}
{
public static void main(String[]args)
{
int num=1;
for (int i=1;i<=18;i=i+2)
{
num=num+i;
System.out.print(" " +num);
}
}
}
Similar questions