Advertisement
Guest User

Untitled

a guest
Apr 15th, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. public class MultipleOfTens {
  2.  
  3. public static void main(String[] args) {
  4. System.out.println(go(4));
  5. }
  6.  
  7. public static String go(int x) {
  8. if(x<=0) return "Not Applicable";
  9. String s = "";
  10. for(int i=1; i<=x; i++) {
  11. s += i*10 + " ";
  12. }
  13. return s;
  14. }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement