Advertisement
Krefeld187

Untitled

Dec 18th, 2020
31
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. package Problem5;
  2.  
  3. public class Lösung
  4. {
  5.  
  6. public Lösung()
  7. {
  8. }
  9.  
  10. static public void main(String args[])
  11. {
  12. System.out.println(res());
  13. }
  14.  
  15. public static int res()
  16. {
  17. int res= 0;
  18. int a = 20;
  19. while(res == 0)
  20. {
  21. if(a % 2 == 0 && a % 3 == 0 && a % 4 == 0 && a % 5 == 0 && a % 6 == 0 && a % 7 == 0 && a % 8 == 0 && a % 9 == 0 && a % 10 == 0 && a % 11 == 0&& a % 12 == 0&& a % 13 == 0&& a % 14 == 0&& a % 15 == 0&& a % 16 == 0&& a % 17 == 0&& a % 18 == 0&& a % 19 == 0&& a % 20 == 0)
  22. res = a;
  23. ++a;
  24. }
  25. return res;
  26. }
  27.  
  28. }
  29.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement