Advertisement
mmayoub

Ex04, 05.06.2021

Jun 5th, 2021
903
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.19 KB | None | 0 0
  1. public class Ex04 {
  2.  
  3.     public static void main(String[] args) {
  4.  
  5.         int sum;
  6.  
  7.         sum = 0;
  8.         for (int i = 5; i <= 30; i++) {
  9.             sum = sum + i;
  10.         }
  11.         System.out.println("sum=" + sum);
  12.     }
  13. }
  14.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement