Advertisement
Guest User

Untitled

a guest
Feb 18th, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1.  
  2. public static String stringMultiplication(String x, int n) {
  3.  
  4. StringBuilder builder = new StringBuilder();
  5. for (int i = 0; i < n; i++) {
  6. builder.append(x);
  7. }
  8. return builder.toString();
  9.  
  10.  
  11. }
  12. public static int luckySum (int h[]) {
  13.  
  14. int rezultat = 0;
  15.  
  16. for(int i = 0; i < h.length; i++) {
  17. rezultat = rezultat + i;
  18. if (h[i] == 13){
  19. break;
  20.  
  21. }
  22.  
  23. }
  24. return rezultat;
  25. }
  26.  
  27. public static int [] allTheWayUp (int n){
  28.  
  29. int rez[] = new int[n+1];
  30.  
  31. for (int i = 0; i<n; i++){
  32.  
  33. for (int j = 0; j<rez.length; j = j + rez[i]){
  34.  
  35.  
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement