Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class MultipleOfTens {
- public static void main(String[] args) {
- System.out.println(go(4));
- }
- public static String go(int x) {
- if(x<=0) return "Not Applicable";
- String s = "";
- for(int i=1; i<=x; i++) {
- s += i*10 + " ";
- }
- return s;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement