Skip to content

1-100 Natural Numbers

Choose a tag to compare

@divyaskesavan divyaskesavan released this 22 Feb 15:58
· 2 commits to main since this release
24f788f

public class NaturalNumbers {
public static void main(String[] args) {
for (int n = 0; n <= 100; n++) {
if (n != 100) {
System.out.print(n + ", ");
} else {
System.out.println(n);
}
}
}
}