Answers for "sum of no"

0

sum of no

public class Demo {
   public static void main(String[] args) {
      int sum = 0;
      int n = 50;
      for (int i = 1; i <= n; i++) {
         sum = sum + i;
      } 
      System.out.println("The Sum Of " + n + "is" + sum);
   }
}
Posted by: Guest on May-25-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language