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 7044779
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:27:01+00:00 2026-05-28T02:27:01+00:00

I have been assigned to make my console program output the following: Grid (1,

  • 0

I have been assigned to make my console program output the following:

Grid
(1, 1) (1, 2) (1, 3) (1, 4) (1, 5) (1, 6) (1, 7)
(2, 1) (2, 2) (2, 3) (2, 4) (2, 5) (2, 6) (2, 7)
(3, 1) (3, 2) (3, 3) (3, 4) (3, 5) (3, 6) (3, 7)
(4, 1) (4, 2) (4, 3) (4, 4) (4, 5) (4, 6) (4, 7)
(5, 1) (5, 2) (5, 3) (5, 4) (5, 5) (5, 6) (5, 7)
(6, 1) (6, 2) (6, 3) (6, 4) (6, 5) (6, 6) (6, 7)
(7, 1) (7, 2) (7, 3) (7, 4) (7, 5) (7, 6) (7, 7)

I think I need to use a for loop then put print inside but I don’t really know how I would arrange the logic… Can someone point me into the right direction?

UPDATE
Here is the solution:

    for (int x = 1; x <= 7; x++) {
        for (int y = 1; y <= 7; y++) {
            System.out.print("(" + x + ", " + y + ")");
            if (y == 7) {
                System.out.print("\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-28T02:27:02+00:00Added an answer on May 28, 2026 at 2:27 am

    you would need two loops. Something like

    for(i = 1; i < 8; i++){
       for(j = 1; j < 8; j++){
          // print code here
       }
    }
    

    since this is homework, you should try to figure out the rest.

    Conceptually, the way this works is you have the outer loop. As it runs, i is 1, then 2, then 3, etc.

    You also have the inner loop. As it runs j is 1, then 2, then 3, etc….

    Since the inner loop is inside the outer loop, when i is 1, the inner loop goes thru ALL of its values. Now look at what you are supposed to print…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been assigned wit the task to write a program that takes a
I need some help with a work project I have been assigned. At the
I have been assigned to make a mail client which access the mail from
I have been assigned a project where I have to make an analog clock
I have been assigned to know to how to make a GPS Navigation Software
I have been trying to make a VBA code to do the following. I
I have been assigned a project to develop a set of classes that act
For my assignment I have been assigned the task of creating a DTD for
Part of a new product I have been assigned to work on involves server-side
My company has a web document management application and I have been assigned to

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.