Hello Friends Today I will Show You How We Can Print 1 3 6 10 15 21 28 sequence using for loop in java
First Create a Class And A function in your Ide or In Your Code editor
For Example
public class Print {
public static void main(String[] args) {
System.out.println("Program Completed");
}
}
In Next Step You Have To write A Login In for loop i am going to you
public class Print {
public static void main(String[] args) {
int sizeofseries=10;
for(int i=2,j=1; i<sizeofseries; i++)
{
System.out.println(j);
j+=i;
}
System.out.println("Program Completed");
}
}
if you want to take sizeofseries from user yo can follow How To Take input in java.
In This Post I have show you how you can print the following series
Making money as a coder in 2025 is not much of a big or tough…
Lloyds Technology Centre, A tech and data company located in Hyderabad, India. They are part of…
How to Increase Height at Any Age Rise Above: How to Increase Height at Any…
In the fast-paced digital world, we often forget the timeless beauty that nature offers. Today,…
Top 10 Deadliest Kicks in Martial Arts: Master the Art of Knockouts Martial arts is…
How to Optimize Battery Life of Your Smartphone: Tips and Tricks for Prolonging Battery Health…
View Comments
Currently it is appropriate time to produce a few plans for the long run and its time to be happy. Ive learn this post and if I may just I want to suggest you some attention-grabbing issues or advice. Perhaps you can post subsequent articles relating to this blogpost. I wish to learn more things related to it!