Advertisement
Xetos

Egyveleg

Feb 25th, 2016
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.46 KB | None | 0 0
  1.  
  2. public class szamosszeg {
  3.  
  4.     public static void main(String[] args) {
  5.         int a=0;
  6.         for(int i=1;i<=10;i++){    
  7.             a+=i;
  8.         }
  9.         System.out.println(a);
  10.     }
  11.  
  12. }
  13.  
  14. public class szamkiiras {
  15.  
  16.     public static void main(String[] args) {
  17.         for(int i=1;i<=10;i++){
  18.             System.out.println(i);
  19.         }
  20.  
  21.     }
  22.  
  23. }
  24.  
  25.  
  26. public class OtParam1 {
  27.  
  28.     public static void main(String[] args) {
  29.     int a=1;
  30.     for(int i=1;i<=10;i++){
  31.             a*=i;
  32.     }
  33.     System.out.println(a);
  34.     }
  35.  
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement