I'm trying to get the multiple of 5 println
on the same line as the number, but it's not working a.t.m., it prints on the next line. The code uses a for loop which makes it more difficult for me anyone have any suggestions.
public static void main(String[] args)
{
for(int i=1 ; i<101; i++)
{
System.out.println(" " +i);
if ( i % 2 != 0 && i % 5 == 0 )
System.out.print("This is an odd number and a multiple of 5 \n " );
}
}//main