Advertisement
Timur69

Accept

Apr 1st, 2020
398
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.32 KB | None | 0 0
  1. package Tasks2;
  2.  
  3. public class Static {
  4.     public static void main(String[] args) {
  5.  
  6.  
  7.         System.out.println(acceptsXY(2, 5));
  8.     }
  9.  
  10.     public static String acceptsXY(int x, int y) {
  11.         String s = "";
  12.         for (int i = 1; i <= y; i++) {
  13.             s += x;
  14.         }
  15.         return s;
  16.  
  17.  
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement