Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6674071
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:42:09+00:00 2026-05-26T03:42:09+00:00

My program is correct except for that in the end, the program must output

  • 0

My program is correct except for that in the end, the program must output two \n\n. Just like that. Only on the last line, however. At every ten sets, it should only output one \n. THis is what the program should look like:

1   2   0       1   5   0       1   8   0       2   1   0
2   4   0       2   7   0       3   0   0       3   3   0
3   6   0       3   9   0  \n   4   2   0       4   5   0
4   8   0       5   1   0       5   4   0       5   7   0
6   0   0       6   3   0       6   6   0       6   9   0  \n
7   2   0       7   5   0       7   8   0       8   1   0
8   4   0       8   7   0       9   0   0       9   3   0
9   6   0       9   9   0  \n  \n

This is my code.

import java.util.Scanner;

public class Exercise4_10 {
    public static void main(String[] args) {
          Scanner input = new Scanner(System.in);
          int count = 1;
          for (int i = 100; i <= 1000; i++) {
              if (i%5==0 && i%6==0)
              System.out.print((count++ % 10 != 0) ? i + " ": i + "\n" );
          }
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T03:42:10+00:00Added an answer on May 26, 2026 at 3:42 am

    add this before the closing brace for main:

    System.out.println("");
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to add plugins to my program, and this looks good, except that
please correct the program. Q. Write a java prg to accept RollNo, Name of
I am trying to make a program that automatically corrects the perspective of a
Program followed by output. Someone please explain to me why 10,000,000 milliseconds from Jan
The program that I am currently assigned to has a requirement that I copy
Challenge The shortest program by character count that accepts standard input of the form
I have a program that records audio from firewire device (FA-66) with Jack connection.
I'm writing a small program in C# that uses SQL to store values into
I'm writing a program that asks the user for their birthdate and then calculates
I am assigning values in a C++ program out of the bounds like this:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.