public class ArgsLoop {
public static void main(String[] args) {
int n = Integer.parseInt(args[0]); // now n=5
for(int i=0;i<n;i++){
System.out.println();
for(int c=i; c>-1; c--){...
Type: Posts; User: MooseManX
public class ArgsLoop {
public static void main(String[] args) {
int n = Integer.parseInt(args[0]); // now n=5
for(int i=0;i<n;i++){
System.out.println();
for(int c=i; c>-1; c--){...
public class ArgsLoop {
public static void main(String[] args) {
int n = Integer.parseInt(args[0]); // now n=5
for(int i=0;i<n;i++){
System.out.print("*");
System.out.println();...
public class ArgsLoop {
public static void main(String[] args) {
int n = Integer.parseInt(args[0]); // now n=5
for(int i=0;i<n;i++){
System.out.println();
System.out.print("*");...
it is posting an extra line e.g
*
**
***
****
*****
*****
that's my output now
public class ArgsLoop {
public static void main(String[] args) {
int n = Integer.parseInt(args[0]); // now n=5
for(int i=0;i<n;i++){
System.out.println("*");
for(int c=i; c>-1; c--){...
for(int i=0;i<n;i++){
System.out.println("*");
I fixed the outer loop,
it runs five times now, but the inner loop still isn't working
That's not helping ^. Can you show me how to do it in code, don't you think I have used paper and pen? That's exactly what I wrote in my first post.
I have been playing around with this code for...
public class ArgsLoop {
public static void main(String[] args) {
int n = Integer.parseInt(args[0]); // now n=5
for(int i=1;i<n;i++){
System.out.println("*");
for(int c=0; c<i; c++){...
Hey I am doing a tutorial at uni and I need to write a code that
Task 3
Write a program that accept from the command line number n and then print stars ‘*’ in n rows.
For example, if n = 5 then...