Coding-ninjas
Coding-ninjas copied to clipboard
i have one more smaller code
Scanner s = new Scanner(System.in); int x = s.nextInt(); int a = 5; int d = 3;
for(int i=1;i<=x;) {
if(a%4!=0) {
System.out.print(a+" ");
i++;
}
a=a+d;
}
}
}