Question

Write the c++ code that run with visual studio Use for loops to display a grid....

Write the c++ code that run with visual studio

Use for loops to display a grid.
−For each position, display the location’s row and column number.
−Put two blanks between each location.


•Example:1,1 1,2 1,3 .... 1,9
2,1 2,2 .... 2,9
....
8,1 8,2 .... 8,9
   9,1 9,2 9,3 .....9,9

0 0
Add a comment Improve this question Transcribed image text
Answer #1
#include <iostream>
using namespace std;

int main() { 
    for(int i = 1;i<=9;i++){
        for(int j = 1;j<=9;j++){
            cout<<i<<","<<j<<"  ";
        }
        cout<<endl;
    }
    return 0; 
}

Add a comment
Know the answer?
Add Answer to:
Write the c++ code that run with visual studio Use for loops to display a grid....
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • can someone solve this program using c++ (visual studio)? You have a grid of 4x4 cells...

    can someone solve this program using c++ (visual studio)? You have a grid of 4x4 cells which is filled by numbers from 1 to 8. Each number appears twice in the grid. The purpose of the Memory Game is to find the matching numbers. To start the game, Player 1 chooses two cells to uncover the numbers behind them. If the numbers match, player 1 gets to go on and uncover two more numbers. If the numbers don't match, player...

  • USE C++ FOR THE CODE THAT CAN RUN IN VISUAL STUDIO 2019 (or a complier) Ignore...

    USE C++ FOR THE CODE THAT CAN RUN IN VISUAL STUDIO 2019 (or a complier) Ignore the last paragraph on the bottom of the page! \ Write a program YourName-Assignments (replace Your Name with your actual name, no spaces) that reads from students' records (one student per line) in the following format: Last Name Tests Grade Assignments Grade and computes and outputs (to the console) the STUDENT STATISTICS in a table format one line per student: Student Name Total Points...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT