import java.util.Scanner

Education
June 30, 2019
NetBeans.
June 30, 2019

import java.util.Scanner;

public class CountToNum {

  public static void main (String [] args) {

     int userNum = 0;

     int i = 0;

     userNum = 4;

     for (i = 1; i <= userNum; i++)

     System.out.print (i);

     System.out.println(“”);

     return;

  }

}

How do I get my results to output the proper spacing EX: 1 2 3 4 instead of 1234?

 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"

Hi there! Click one of our representatives below and we will get back to you as soon as possible.

Chat with us on WhatsApp